Skip to content

A simple chatbot πŸ€– built with NLTK for NLP 🧠 and Gradio for a web interface πŸ’», allowing users to interact with the bot through basic text inputs πŸ’¬.

License

Notifications You must be signed in to change notification settings

LaithALhaware/Chatbot-with-Natural-Language-Processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Chatbot with Natural Language Processing (NLP) 🌐

This project is a simple chatbot built using Natural Language Processing (NLP) with the nltk library and a web-based GUI using the Gradio library. The chatbot can respond to basic user queries and provide simple conversational responses. πŸ’¬

✨ Features

  • Text-based chatbot using regular expression matching for user input. πŸ”
  • Web-based interface using Gradio for easy interaction with the chatbot. 🌐
  • Predefined responses for common user inputs such as greetings, inquiries, and exit phrases. πŸ‘‹

πŸ› οΈ Prerequisites

Before running the project, ensure you have Python installed and the necessary libraries:

  • nltk for Natural Language Processing 🧠
  • gradio for the web-based interface 🌍

πŸ—οΈ Project Setup

  • Open CMD πŸ–₯️
Operating System Steps
Windows πŸ’» 1. Press Windows + R to open the "Run" dialog box.
2. Type cmd and hit Enter.
3. The Command Prompt (CMD) will open.
Alternatively, you can search for "Command Prompt" in the Start menu and click to open it. πŸ”
4. To navigate to the Desktop, type cd %USERPROFILE%\Desktop and hit Enter. πŸ“‚
Linux 🐧 1. Press Ctrl + Alt + T to open the terminal.
2. Alternatively, search for "Terminal" in your applications menu. πŸ’¨
3. To navigate to the Desktop, type cd ~/Desktop and hit Enter. πŸ“‚
  • Clone the repository or download the project files to your local machine. πŸ“‚
git clone https://github.com/LaithALhaware/Chatbot-with-Natural-Language-Processing.git
cd 'Chatbot-with-Natural-Language-Processing'
  • Install the dependencies using pip:
pip install nltk gradio

Download necessary NLTK resources:

The nltk.download('punkt') in the code will download the necessary resources when you run the project. 🌱

πŸš€ Running the Chatbot on Web Page

To start the chatbot, run the Python script:

python app-GUI.py

Once the script is executed, Gradio will open a local web server, and you can access the chatbot by visiting the URL shown in the terminal, usually http://127.0.0.1:[PORT SHOWING ON CMD]/. πŸ”—

πŸš€ Running the Chatbot on CMD

To start the chatbot, run the Python script:

python app-CMD.py

πŸ› οΈ How It Works

  • The user inputs a message in the text box. πŸ“
  • The chatbot processes the input and returns an appropriate response based on predefined patterns. πŸ”„
  • Common responses include greetings, checking on the chatbot’s status, and handling unknown inputs. πŸ€”
  • The user can exit the chat by typing bye or exit. βœ‹

πŸ—£οΈ Example Interaction

User: Hi πŸ‘‹

Chatbot: Hello! πŸ€–

User: How are you? πŸ€”

Chatbot: I am good, thank you for asking! 😊

User: Bye πŸ‘‹

Chatbot: Goodbye! ✨ Image

🎨 Customization

  • You can expand the chatbot's functionality by adding more patterns and responses in the patterns list. πŸ“œ
  • Modify the respond_to_input() function to integrate more advanced NLP models or data processing techniques. 🧠
  • The Gradio interface can also be customized by changing the appearance, layout, and adding additional components like images or files. 🎨

πŸ“ License

This project is licensed under the License. See the LICENSE.txt βš–οΈ file for details.


❀️ Support This Project

If you find this project useful, consider supporting its development:

πŸ’° Via PayPal: [PayPal Link]

Your support helps keep this project alive! πŸš€πŸ”₯

About

A simple chatbot πŸ€– built with NLTK for NLP 🧠 and Gradio for a web interface πŸ’», allowing users to interact with the bot through basic text inputs πŸ’¬.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages