A smart chatbot that can understand travel-related questions and give quick and helpful answers. It uses machine learning and language processing to talk like a human and respond correctly.
The FAQs Chatbot's user interface is designed to be simple, responsive, and interactive, making it easy for users to ask questions and receive answers in real-time.
Key Elements:
- Chat Window: A central area where users can type their queries and view responses from the bot.
- Input Box: Allows users to enter their travel-related questions.
- Send Button: Triggers the chatbot to process the query and display an answer.
- Bot Response Area: Dynamically updates to show the chatbot's replies in a conversational format.
- Responsive Design: Fully optimized for desktop, tablet, and mobile devices using HTML/CSS.
- User types a question in the input field.
- The query is sent to the Flask backend.
- The model predicts the intent using TensorFlow and NLP (SpaCy).
- A relevant answer is selected and displayed in the chat window.
The chatbot is built using Flask as the backend, HTML/CSS/JS for the user interface, and tools like TensorFlow and SpaCy for intent recognition and prediction. A custom intents.json file stores predefined categories and responses.
| Layer | Technologies Used |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | Flask (Python Web Framework) |
| NLP | SpaCy (for text preprocessing and tokenization) |
| Machine Learning | TensorFlow (for training and intent classification) |
| Data Handling | Custom intents.json file (predefined Q&A dataset) |
| Model Format | .keras file (Keras-trained TensorFlow model) |
-
User Input
The user sends a query via the chatbot interface in the browser. -
Frontend to Backend
The input is sent to the Flask backend using JavaScript (typically via a POST request). -
Preprocessing & Prediction
The backend uses SpaCy to preprocess the text and passes it to the trained TensorFlow model. -
Intent Classification
The model predicts the intent of the user’s query (e.g., flight info, visa, currency). -
Response Retrieval
Based on the predicted intent, a matching response is fetched from theintents.jsonfile. -
Reply to User
The response is sent back to the frontend and displayed in the chat window.
⚙️ Behind the scenes, the system uses a simple rule-based + ML hybrid architecture to deliver fast and accurate answers to travel-related FAQs.
-
🤖 AI-Powered Chatbot
Understands and responds to travel-related questions using a trained machine learning model. -
🧠 Intent Recognition
Classifies user queries into predefined categories using NLP and TensorFlow. -
📚 Custom Intent Dataset
Uses a handcraftedintents.jsonfile containing common travel questions and answers. -
💬 Real-Time Interaction
Instant responses via a seamless chat interface built with HTML, CSS, and JavaScript. -
🛠️ Lightweight Flask Backend
Fast and easy-to-deploy Python server to handle logic and model inference. -
🗣️ Natural Language Processing
Text preprocessing powered by SpaCy for more accurate intent classification. -
📱 Responsive UI
Chat interface works smoothly across desktop, tablet, and mobile devices. -
🧩 Modular Architecture
Cleanly separated UI, backend, and model logic for easy customization and scaling.
- Python 3.10 or higher
- pip (Python package manager)
- Git (to clone the repository)
-
Clone the Repository
git clone https://github.com/your-username/travel-faqs-chatbot.git cd travel-faqs-chatbot -
Create a Virtual Environment (Optional but Recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Required Packages
pip install -r requirements.txt
-
Start the Flask Server
python app.py
-
Access the Chatbot Open your browser and go to: localhost:5000
currency-converter-chatbot/
│
├── .gitignore # Git ignore rules (should include .venv, .env, __pycache__)
├── app.py # Main Flask application handling webhook logic
├── chat.py # Chatbot logic and ML integration
├── chatbot_model.keras # Trained TensorFlow model
├── data.pickle # Contains the preprocessed data (words, labels)
├── intents.json # This file has the intents for the Chatbot
├── model.py # Model training file
├── requirements.txt # List of Python dependencies
└── README.md # Project documentationI would like to thank the following tools, libraries, and communities for making this project possible:
- TensorFlow – for building and training the intent classification model
- SpaCy – for natural language preprocessing
- Flask – for creating a lightweight and scalable backend
- NLTK – for supporting text cleaning and processing
- [JavaScript, HTML, CSS] – for designing a responsive and interactive user interface
The open-source community – for continuous support, resources, and inspiration
Thank you for taking the time to explore this project! I hope this spam detection system is helpful for learning, experimentation, and real-world understanding of text classification.
If you have any feedback, suggestions, or improvements, feel free to reach out or raise an issue. Happy coding! 🚀

