--- license: apache-2.0 title: 🧠AI ChatbotπŸ€– sdk: streamlit emoji: πŸ’» colorFrom: pink colorTo: purple thumbnail: >- https://cdn-uploads.huggingface.co/production/uploads/6686260107019f3fe482ce08/xfpa6MidZ5aE9OEP96pi5.jpeg short_description: The System on Real-Time Intent Recognition and Conversations sdk_version: 1.44.1 --- # **πŸ€– AI-Powered Chatbot using NLP** ## **πŸ“Œ Introduction** This project is an **AI-driven chatbot**, developed as part of my **AICTE-Shell Internship**. The chatbot leverages **Natural Language Processing (NLP) and Deep Learning** techniques using **BERT** to provide intelligent responses based on user queries. The chatbot is trained on an **Intent JSON dataset** and fine-tuned to enhance accuracy. πŸ”— **Deployed Application:** [🧠AI ChatbotπŸ€–](https://huggingface.co/spaces/SamarthPujari/AI-Chatbot) ## **🎯 Project Goals** βœ… Implement **AI & NLP techniques** for intelligent conversation. βœ… Explore **BERT-based Deep Learning** for chatbot development. βœ… Develop a **context-aware chatbot** with high accuracy. βœ… Enhance **text preprocessing, model training, and deployment skills**. βœ… Deploy an **interactive chatbot web app** using **Streamlit**. ## **πŸ“‚ Dataset Used** The chatbot is trained on a **custom Intent JSON dataset**, which includes: - **User Queries & Responses**: Predefined conversations. - **Intent Classification Data**: Labeled conversations for accurate intent detection. - **Pretrained BERT Model**: Fine-tuned for improved understanding. ## **πŸ“Š Methodology** ### **Step 1: Data Collection & Preprocessing** πŸ”Ή Loaded and cleaned **Intent JSON dataset**. πŸ”Ή **Tokenized text data** using BERT tokenizer. πŸ”Ή **Converted labels to categorical format** for training. ### **Step 2: Model Selection & Training** πŸ”Ή Used **BERT (Bidirectional Encoder Representations from Transformers)**. πŸ”Ή Implemented **deep learning-based intent classification**. πŸ”Ή Trained on multiple epochs & tuned hyperparameters for **optimal accuracy**. πŸ”Ή Evaluated **training & validation accuracy** to ensure model performance. ### **Step 3: Chatbot Development & Integration** πŸ”Ή Built an **Intent Recognition Model** using **BERT for Sequence Classification**. πŸ”Ή Designed a **Response Generation Mechanism** for accurate replies. πŸ”Ή Integrated trained model into a **Streamlit & HuggingFace web app** for user interaction. ### **Step 4: Deployment & User Interaction** πŸ”Ή **Saved and exported the trained BERT model** for real-time inference. πŸ”Ή Deployed chatbot as a **Streamlit as well as HuggingFace web app**. πŸ”Ή **Implemented real-time conversations** with NLP-powered responses. ## **πŸ” Key Features** βœ… **Real-time Chatbot using BERT-based Intent Recognition**. βœ… **Deep Learning Model trained on an Intent JSON dataset**. βœ… **Optimized Text Processing & Tokenization**. βœ… **Accurate Intent Classification for diverse queries**. βœ… **Deployable on Web using Streamlit**. ## **πŸš€ Technologies Used** | Category | Tools & Libraries | |---------------------|-------------------| | **Development** | Python, Jupyter Notebook, Anaconda, VS Code| | **NLP Frameworks** | Hugging Face Transformers, BERT | | **Machine Learning** | TensorFlow, PyTorch | | **Data Processing** | Pandas, NumPy | | **Deployment** | Streamlit, Streamlit Cloud, HuggingFace | ## **πŸ“· Screenshots** | **Streamlit App - Chatbot Interface** | |---------------------------------------| |![Screenshot 2025-03-15 122923](https://github.com/user-attachments/assets/8c1efceb-3f62-4b5e-b77b-74d64e6600cb)| | **Streamlit App - Chatbot Interface** | |---------------------------------------| |![Screenshot 2025-03-15 123114](https://github.com/user-attachments/assets/d7be631b-e5de-46cc-aba1-6dda6f85e04a)| | **Streamlit App - Chatbot Interface** | |---------------------------------------| |![Screenshot 2025-03-15 123048](https://github.com/user-attachments/assets/d881f663-8335-4228-8c1a-564ba8652370)| | **Streamlit App - Chatbot Interface** | |---------------------------------------| |![Screenshot 2025-03-15 123003](https://github.com/user-attachments/assets/4a78aba1-77a9-4a34-9740-9217e88518da)| ## **🎯 Future Improvements** πŸ”Ή Expand dataset with **more real-world conversations**. πŸ”Ή Integrate **voice-based interaction** using Speech Recognition. πŸ”Ή Enhance **context retention** for long conversations. πŸ”Ή Optimize model efficiency for **faster response times**. πŸ”Ή Expanding chatbot capabilities with **multilingual support**. ## **πŸ“₯ Installation & Setup** ### **πŸ”Ή Clone the Repository** ```bash git clone https://github.com/Samarth4023/Shell-Internship-2.git cd Shell-Internship-2 ``` ### **πŸ”Ή Install Required Dependencies** ```bash pip install -r requirements.txt ``` ### **πŸ”Ή Run the Streamlit App** ```bash streamlit run app.py ``` ## **πŸ“œ License** This project is **open-source** and free to use. Feel free to contribute! ## **πŸ“§ Contact** πŸ“Œ **Author:** Samarth Pujari πŸ“Œ **GitHub:** [Samarth4023](https://github.com/Samarth4023) πŸ“Œ **LinkedIn:** [Samarth Pujari](https://www.linkedin.com/in/samarth-pujari-328a1326a)