SkillAgentSearch skills...

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/Chatpy
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <h1>ChatPy</h1> </div>

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 from intents.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

  1. Load Data: The chatbot loads the intents from the intents.json file.
  2. Process Input: User input is processed using NLP techniques such as tokenization and stemming.
  3. Predict Intent: Based on the processed input, the chatbot predicts the intent of the user using the trained model.
  4. Generate Response: The chatbot selects an appropriate response from the predefined responses in the intents.json file.
  5. GUI Interaction: The chatbot can be interacted with through a graphical user interface (GUI) built using Tkinter, providing a user-friendly experience.
<div align="center"> <img src="https://github.com/farzadasgari/chatpy/blob/main/images/screen.PNG?raw=true"> </div>

Getting Started

  1. Clone the repository:
    git clone https://github.com/farzadasgari/chatpy.git
    
  2. Navigate to the project directory:
    cd chatpy
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    
  4. Train the model:
    python train.py
    
  5. 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

portfolio

Google Scholar Badge

ResearchGate Badge

linkedin

Related Skills

View on GitHub
GitHub Stars11
CategoryCustomer
Updated5mo ago
Forks0

Languages

Python

Security Score

87/100

Audited on Nov 3, 2025

No findings