File size: 2,250 Bytes
6c71b39
e5e10d4
6c71b39
 
 
 
24bb362
6c71b39
 
 
 
e5e10d4
 
5f1dc3d
6c71b39
24bb362
be68b44
5f1dc3d
a7c78de
 
 
e5e10d4
a7c78de
5f1dc3d
 
 
 
 
 
 
a7c78de
 
 
24bb362
a7c78de
5f1dc3d
 
 
 
 
 
 
 
 
 
 
 
a7c78de
 
 
5f1dc3d
6c71b39
5f1dc3d
a7c78de
 
24bb362
 
e944d66
a7c78de
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
---
title: PromptPilot (AML-3304)
emoji: πŸ€–
colorFrom: blue
colorTo: indigo
sdk: streamlit
sdk_version: 1.20.0
app_file: app.py
pinned: false
---

# πŸ€– PromptPilot – Unified AI Chatbot (AML-3304)

This is an MVP AI chatbot developed for the **AML-3304 assignment**:

**"From Tokens to Transformers: Building AI Systems with Embeddings, Generative Models, and MLOps."**

PromptPilot combines five intelligent chat modes powered by popular Transformer-based models, enabling users to explore code generation, factual Q&A, probabilistic reasoning, and paraphrasing.

---

## πŸ”„ Chat Modes

| Mode                    | Description                                                 | Model Used                            |
|-------------------------|-------------------------------------------------------------|----------------------------------------|
| πŸ§‘β€πŸ’» Code Generator       | Generate Python code from plain language                    | `Salesforce/codegen-350M-mono`         |
| πŸ“˜ General Q&A          | Factual question answering and explanations                 | `google/flan-t5-base`                  |
| πŸ“Š Bayesian Q&A         | Uncertainty-based reasoning using sampling                  | `google/flan-t5-base` + top-k sampling |
| 🌐 Deep Coder           | Technical Q&A and code completion tasks                     | `deepseek-ai/deepseek-coder-6.7b-instruct` |
| πŸ” Transformer Explorer | Paraphrasing and text transformation using sequence models  | `google/flan-t5-base`                  |

---

## πŸš€ Live Demo

Try the chatbot here:  
**πŸ”— [https://huggingface.co/spaces/Group2255/programming-help-chatbot](https://huggingface.co/spaces/Group2255/programming-help-chatbot)**

---

## 🧩 Features

- Multi-mode UI for interactive exploration  
- Efficient model switching using `st.session_state`  
- GPU-compatible on Hugging Face Spaces  
- Supports both deterministic and sampling-based generation  
- Lightweight models for fast response and free-tier compatibility  

---

## πŸ’» Run Locally

### βœ… Option 1: Python + Streamlit

```bash
git clone https://huggingface.co/spaces/Group2255/programming-help-chatbot
cd programming-help-chatbot
pip install -r requirements.txt
streamlit run app.py