This is a simple chatbot created using Python and Natural Language Processing (NLP). The chatbot can handle basic conversations like greetings, farewells, and answering specific queries based on predefined intents.
intents.json
: Contains the predefined intents, patterns, and responses for the chatbot.app.py
: The main script that loads the intents, processes user input, and generates responses using NLP techniques. It also runs the GUI.train.py
: A script to train the chatbot model using the data fromintents.json
.model.py
: Contains the neural network model architecture used for predicting user intents.nltk_utils.py
: Utility functions for text preprocessing, including tokenization and stemming.chat.py
: Provides a command-line interface (CLI) for interacting with the trained chatbot, separate from the GUI.
- Load Data: The chatbot loads the intents from the
intents.json
file. - Process Input: User input is processed using NLP techniques such as tokenization and stemming.
- Predict Intent: Based on the processed input, the chatbot predicts the intent of the user using the trained model.
- Generate Response: The chatbot selects an appropriate response from the predefined responses in the
intents.json
file. - GUI Interaction: The chatbot can be interacted with through a graphical user interface (GUI) built using Tkinter, providing a user-friendly experience.
- Clone the repository:
git clone https://github.com/farzadasgari/chatpy.git
- Navigate to the project directory:
cd chatpy
- Install the required dependencies:
pip install -r requirements.txt
- Train the model:
python train.py
- Run the chatbot with GUI:
python app.py
- Implementing a more advanced NLP model for better intent recognition.
- Adding more intents and responses to make the chatbot more versatile.
- Integrating with external APIs to provide real-time data or services.
- Enhancing the GUI with more features and customization options.
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries, please contact: