This repository contains two intent-based chatbots built using Natural Language Processing (NLP) techniques. One chatbot is deployed using Localtunnel, and the other is deployed directly through a Streamlit account.
To interact with the chatbot deployed using Streamlit, click the link below:
🔗 Chatbot URL
To view and run the chatbot deployed using Localtunnel, follow the instructions in the provided Jupyter Notebook (.ipynb
). The notebook contains step-by-step instructions for:
1️⃣ Setting up the environment
2️⃣ Preparing the data and code
3️⃣ Running the chatbot using Localtunnel on Streamlit
To run the chatbot with a Streamlit account:
- ✍️ Create an account on the Streamlit website.
- 📁 Copy the
app.py
,requirements.txt
, andintents.json
files to a GitHub repository. - 🔧 Go to your Streamlit account, and click on Create App.
- 🔗 Connect your GitHub repository and fill out the required fields.
- 🚀 Streamlit will fetch the details from GitHub and generate a public URL for your app.
- Patterns: User input phrases (e.g., "Hello", "How are you?").
- Tags: Intent labels (e.g., "greeting", "goodbye").
- Responses: Predefined chatbot responses for each tag.
- 📝 TF-IDF Vectorization: Converts patterns into numerical data.
- 🔢 Label Encoding: Converts intent tags into numerical values.
- 🤖 Uses a Random Forest Classifier for intent classification.
- 📈 Predicts user intent and retrieves a relevant response.
- 💬 Text Input: Users type their messages.
- 🗂️ Chat History: Displays conversation logs.
- 📊 Model Evaluation: Includes accuracy metrics and a classification report.
- 🌍 Localtunnel for public URL generation.
- 🚀 Streamlit for seamless web app deployment.
- Solution: Restart Localtunnel or reload the URL.
- Ensure
requirements.txt
andintents.json
are properly linked in the GitHub repository.
- Google Drive (account for storing files)
- Google Colab (Any Python environment supporting Jupyter notebooks)
- 🖥️ Python 3.6+
- 🌐 Streamlit (For running the interactive app)
- 🧠 NLTK (for natural language processing)
- 📊 scikit-learn (for ML model training)
- 🚀 localtunnel (for public URL generation)
- 💾 A GitHub repository with the required files.
-
Prepare Files:
app.py
: Main Streamlit app.intents.json
: Chatbot data file.requirements.txt
: Python dependencies.
-
Push Files to GitHub:
- Upload the above files to a GitHub repository.
-
Create a Streamlit App:
- Visit Streamlit.
- Click Create App.
- Select your GitHub repository.
- 🎉 Streamlit will generate a public URL for your chatbot.