Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rayyan9477/chatbot
This project presents an advanced implementation of a contextual chatbot using PyTorch. The chatbot leverages deep learning techniques to understand and respond to user inputs in a conversational manner. The project is designed to be beginner-friendly while providing a comprehensive understanding of chatbot development.
https://github.com/rayyan9477/chatbot
generative-ai machine-learning nlp-machine-learning python transformer
Last synced: 3 days ago
JSON representation
This project presents an advanced implementation of a contextual chatbot using PyTorch. The chatbot leverages deep learning techniques to understand and respond to user inputs in a conversational manner. The project is designed to be beginner-friendly while providing a comprehensive understanding of chatbot development.
- Host: GitHub
- URL: https://github.com/rayyan9477/chatbot
- Owner: Rayyan9477
- Created: 2024-11-03T13:18:57.000Z (4 days ago)
- Default Branch: main
- Last Pushed: 2024-11-03T13:32:07.000Z (4 days ago)
- Last Synced: 2024-11-03T14:26:06.429Z (4 days ago)
- Topics: generative-ai, machine-learning, nlp-machine-learning, python, transformer
- Language: Python
- Homepage:
- Size: 727 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Contextual Chatbot Implementation in PyTorch
## Project Description
This project presents an advanced implementation of a contextual chatbot using PyTorch. The chatbot leverages deep learning techniques to understand and respond to user inputs in a conversational manner. The project is designed to be beginner-friendly while providing a comprehensive understanding of chatbot development. It includes a straightforward Feed Forward Neural Network with two hidden layers and allows for easy customization to fit various use cases.
### Technologies and Techniques Used
- **Programming Language**: Python
- **Deep Learning Framework**: PyTorch
- **Natural Language Processing**: NLTK (Natural Language Toolkit)
- **Model Architecture**: Feed Forward Neural Network
- **Training Data**: Customizable intents defined in `data.json`
- **Tokenization and Vocabulary**: Custom tokenizer and vocabulary files## How to Run the Project
### Prerequisites
Ensure you have the following installed on your machine:
- Python 3.6 or higher
- `pip` (Python package installer)### Installation
1. **Install Dependencies**
```sh
pip install -r requirements.txt
```### Training the Model
1. **Customize Intents**
Modify the `data.json` file to include your own patterns and responses.2. **Run the Training Script**
```sh
python train.py
```### Using `tobin.py`
1. **Run the Tobin Script**
```sh
python tobin.py path_to_safetensors path_to_desired model.bin
```
note use same folder(Fine Tuned Model)
3. **Functionality**
The `tobin.py` script provides additional utilities for data preprocessing and analysis. It can be used to transform raw data into a format suitable for training and to perform exploratory data analysis.### Running the Chatbot
1. **Start the Chatbot**
```sh
python chat.py
```2. **Interact with the Chatbot**
The chatbot will prompt you to enter your queries and will respond based on the trained model.### Additional Information
- **Hyperparameter Tuning**: You can adjust the hyperparameters in `hyperparameter_tuning.py` to optimize the model performance.
- **Model Checkpoints**: The trained model and tokenizer configurations are saved in the `fine_tuned_model_checkpoint` directory.
- **Fine-Tuning**: You can further fine-tune the model by modifying the training scripts and re-running the training process.- ## Contact
- **GitHub**: Rayyan9477 (https://github.com/Rayyan9477)
- **LinkedIn**: Rayyan Ahmed (https://www.linkedin.com/in/rayyan-ahmed9477/)
- **Email**: [email protected]