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.
- 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!
- Clone this repo or download all files.
- Install dependencies:
(If
pip install -r requirements.txt
requirements.txtis missing, install:streamlit tensorflow nltk numpy pickle5and others as needed.) - Run the app:
streamlit run app.py
- Open your browser to:
http://localhost:8501 - Start chatting!
app.py- Streamlit web app codeintents.json- Your intent patterns and responsesintents_chatbot_2025.keras- Trained modeltokenizer.pkl- Fitted tokenizer objectlabel_encoder.pkl- Fitted label encoderintents_chatbot_logo.png- (Optional) Logo for your botREADME.md- This file!
- 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.
- 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.
Built by Khush Thakkar.
Pull requests and suggestions are welcome!