Skip to content

khush-thakkar-09/Intent-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Intent-Chatbot

Intents Chatbot (Chatlee) 🤖

Chatlee is a simple AI-powered chatbot built with TensorFlow, Keras, and Streamlit. It uses Natural Language Processing (NLP) to detect user intent and respond accordingly. This project is designed as a hands-on, practical introduction to building and deploying a basic intent-based chatbot.


✨ Features

  • Intent Detection: Classifies user queries into pre-defined intents using a deep learning model.
  • Text Preprocessing: Uses NLTK for tokenization, stopword removal, and lemmatization.
  • Pre-trained Embeddings: Integrates GloVe word vectors for richer language understanding.
  • Interactive Chat UI: Built with Streamlit for a clean, browser-based chat experience.
  • Session Chat History: Remembers the full conversation in the browser session.
  • Easily Expandable: Add more intents and responses by editing intents.json.
  • Simple, Fast, and Fun to Use!

🚀 Quick Start

  1. Clone this repo or download all files.
  2. Install dependencies:
    pip install -r requirements.txt
    (If requirements.txt is missing, install: streamlit tensorflow nltk numpy pickle5 and others as needed.)
  3. Run the app:
    streamlit run app.py
  4. Open your browser to:
    http://localhost:8501
  5. Start chatting!

🛠️ Files & Folders

  • app.py - Streamlit web app code
  • intents.json - Your intent patterns and responses
  • intents_chatbot_2025.keras - Trained model
  • tokenizer.pkl - Fitted tokenizer object
  • label_encoder.pkl - Fitted label encoder
  • intents_chatbot_logo.png - (Optional) Logo for your bot
  • README.md - This file!

🧠 How It Works

  • Data Preparation: All possible user inputs and bot responses are defined in intents.json.
  • NLP Preprocessing: Each user message is tokenized, lowercased, cleaned, and lemmatized.
  • Model Prediction: The message is vectorized and fed to a Keras LSTM model using GloVe embeddings.
  • Intent Matching: The model predicts the intent tag, and a matching response is randomly chosen from the tag’s responses.
  • Persistent Chat: Conversation history is stored in the browser with Streamlit’s session_state.

📈 Limitations

  • Not a “true AI” chatbot—can only answer intents it’s trained on.
  • Cannot answer open-domain or highly complex questions.
  • Best used as a starting point for learning/development.

👤 Author

Built by Khush Thakkar.


Pull requests and suggestions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages