Chatpy
Simple Python-based chatbot using NLP for intent recognition. Features a user-friendly GUI built with Tkinter. Handles basic conversations like greetings, farewells, and FAQs. Easily customizable intents and responses. Ideal for learning or small projects.
Install / Use
/learn @farzadasgari/ChatpyREADME
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.
Project Structure
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.
How It Works
- Load Data: The chatbot loads the intents from the
intents.jsonfile. - 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.jsonfile. - GUI Interaction: The chatbot can be interacted with through a graphical user interface (GUI) built using Tkinter, providing a user-friendly experience.
Getting Started
- 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
Future Enhancements
- 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.
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For any inquiries, please contact:
- std_farzad.asgari@alumni.khu.ac.ir
- khufarzadasgari@gmail.com
Links
Related Skills
openhue
351.2kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
351.2kElevenLabs text-to-speech with mac-style say UX.
weather
351.2kGet current weather and forecasts via wttr.in or Open-Meteo
casdoor
13.3kAn open-source AI-first Identity and Access Management (IAM) /AI MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
