https://github.com/barraharrison/ai-chatbot
Building an AI Chatbot in Python using PyTorch.
https://github.com/barraharrison/ai-chatbot
chatbot-application machine-learning python pytorch
Last synced: 6 months ago
JSON representation
Building an AI Chatbot in Python using PyTorch.
- Host: GitHub
- URL: https://github.com/barraharrison/ai-chatbot
- Owner: BarraHarrison
- Created: 2025-04-05T04:32:58.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-04-09T09:03:45.000Z (9 months ago)
- Last Synced: 2025-04-09T19:47:02.274Z (9 months ago)
- Topics: chatbot-application, machine-learning, python, pytorch
- Language: Python
- Homepage:
- Size: 2.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π€ AI Chatbot Assistant
Welcome to the **AI Chatbot Assistant**, a powerful and interactive Python-based chatbot built using **PyTorch**, **PyQt5**, and modern AI libraries. This project combines machine learning, voice recognition, text-to-speech, and real-time APIs β all within a sleek GUI interface.
Whether you prefer typing or speaking, this assistant is ready to help with news updates, weather forecasts, stock prices, jokes, and more!
---
## π Features
β
**Terminal Chatbot** β Classic command-line interface powered by a custom-trained PyTorch model.
β
**Voice Recognition** β Speak naturally to the bot using your microphone via Google Speech Recognition.
β
**Text-to-Speech (TTS)** β The chatbot talks back using `pyttsx3`, supporting multiple voices and languages.
β
**Real-Time API Integrations**
- **News Headlines** (NewsAPI.org)
- **Weather Forecasts** (OpenWeatherMap)
- **Stock Market Prices** (TwelveData API)
β
**Graphical User Interface (GUI)** β Built with `PyQt5`, the bot features a clean, interactive design inspired by modern assistant apps.
β
**Standalone Terminal App** β Runs independently from your terminal using the pre-trained model, no retraining required.
β
**Custom App Icon** β Personalized `.icns` icon for use when packaged into a native desktop application (macOS).
---
## πͺ Installation & Setup
### 1. Clone the Repository
```bash
git clone https://github.com/YourUsername/AI-Chatbot-Assistant.git
cd AI-Chatbot-Assistant
```
### 2. Create and Activate a Virtual Environment
```bash
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
### 3. Install Dependencies
```bash
pip install -r requirements.txt
```
> If `requirements.txt` is missing, manually install:
```bash
pip install torch numpy nltk pyttsx3 PyQt5 speechrecognition python-dotenv requests
```
### 4. Add Your `.env` File
Create a `.env` file in the root directory and include the following:
```env
NEWS_API_KEY=your_newsapi_key
WEATHER_API_KEY=your_openweathermap_key
STOCK_API_KEY=your_twelvedata_key
```
---
## π§ Running the Chatbot
### β Option 1: Terminal Mode
```bash
python3 main.py
```
### β Option 2: GUI Mode (with voice + TTS)
```bash
python3 chat_gui.py
```
Once launched, the chatbot will be ready to interact with you using text or voice.
---
## π€ Voice Commands Examples
- βTell me a jokeβ
- βWhat's the weather like?β
- βHow is Nvidia doing today?β
- βWhat are the latest news headlines?β
- βWhatβs todayβs date?β
---
## π¦ Packaging (Optional)
You can package the app into a macOS `.app` bundle using PyInstaller:
```bash
pyinstaller chat_gui.spec
```
> Remember to configure `datas` and `icon` correctly in the `.spec` file.
---
## π Conclusion
This AI Chatbot Assistant is more than just a project β it's a complete personal assistant powered by speech, APIs, and machine learning. Whether youβre a developer learning NLP or just want a smart terminal buddy, this assistant is built to adapt and grow.
---
## π§βπ» Author
Built with π» by **Barra Harrison**
[GitHub](https://github.com/BarraHarrison)
---
## π License
This project is licensed under the MIT License.
---