File size: 5,344 Bytes
3cddd18
 
 
 
 
 
 
 
 
 
a43e25e
3cddd18
e27f7ec
d18888e
e27f7ec
 
 
72e0ef4
e27f7ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
daf14da
 
 
 
 
 
 
 
 
 
 
 
 
e27f7ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a43e25e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
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)