Spaces:
Sleeping
Sleeping
Upload 4 files
Browse files
README.md
CHANGED
|
@@ -1,37 +1,89 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
- Bayesian-style inference
|
| 7 |
|
| 8 |
---
|
| 9 |
|
| 10 |
-
## π Modes
|
| 11 |
|
| 12 |
-
| Mode | Description | Model |
|
| 13 |
-
|------|-------------|-------|
|
| 14 |
-
| π§βπ» Code Generator |
|
| 15 |
-
| π General Q&A |
|
| 16 |
-
| π Bayesian Q&A |
|
| 17 |
|
| 18 |
---
|
| 19 |
|
| 20 |
## π Hosted on Hugging Face Spaces
|
| 21 |
|
| 22 |
-
[Live Demo](https://huggingface.co/spaces/YOUR_USERNAME/unified-chatbot)
|
|
|
|
| 23 |
|
| 24 |
---
|
| 25 |
|
| 26 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
```bash
|
|
|
|
|
|
|
| 29 |
pip install -r requirements.txt
|
| 30 |
streamlit run app.py
|
| 31 |
```
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
---
|
| 34 |
|
| 35 |
## π License
|
| 36 |
|
| 37 |
-
MIT License
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Unified AI Chatbot (AML-3304)
|
| 3 |
+
emoji: π€
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: "1.20.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
+
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Unified AI Chatbot π€
|
| 17 |
|
| 18 |
+
This is an **MVP AI chatbot project** for the **AML-3304 course assignment** titled:
|
| 19 |
+
|
| 20 |
+
**βFrom Tokens to Transformers: Building AI Systems with Embeddings, Generative Models, and MLOps.β**
|
|
|
|
| 21 |
|
| 22 |
---
|
| 23 |
|
| 24 |
+
## π Supported Modes
|
| 25 |
|
| 26 |
+
| Mode | Description | Model Used |
|
| 27 |
+
|------|-------------|------------|
|
| 28 |
+
| π§βπ» Code Generator | Generate Python code from natural language | `Salesforce/codegen-350M-mono` |
|
| 29 |
+
| π General Q&A | Answer factual questions with reasoning | `google/flan-t5-base` |
|
| 30 |
+
| π Bayesian Q&A | Sample-based Q&A with top-k decoding | `google/flan-t5-base` |
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
## π Hosted on Hugging Face Spaces
|
| 35 |
|
| 36 |
+
π [Live Demo](https://huggingface.co/spaces/YOUR_USERNAME/unified-chatbot)
|
| 37 |
+
*(Replace YOUR_USERNAME after deployment)*
|
| 38 |
|
| 39 |
---
|
| 40 |
|
| 41 |
+
## π» Local Installation
|
| 42 |
+
|
| 43 |
+
Clone the project and run locally with Python or Docker:
|
| 44 |
+
|
| 45 |
+
### Option 1: Python + Streamlit
|
| 46 |
|
| 47 |
```bash
|
| 48 |
+
git clone https://github.com/YOUR_USERNAME/unified-chatbot
|
| 49 |
+
cd unified-chatbot
|
| 50 |
pip install -r requirements.txt
|
| 51 |
streamlit run app.py
|
| 52 |
```
|
| 53 |
|
| 54 |
+
### Option 2: Docker
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
docker build -t unified-chatbot .
|
| 58 |
+
docker run -p 8501:8501 unified-chatbot
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
Then open your browser at: `http://localhost:8501`
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## π¦ Project Structure
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
βββ app.py # Streamlit application
|
| 69 |
+
βββ requirements.txt # Python dependencies
|
| 70 |
+
βββ Dockerfile # Optional Docker support
|
| 71 |
+
βββ README.md # This file
|
| 72 |
+
βββ space.yaml # (Optional) Hugging Face metadata
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
---
|
| 76 |
+
|
| 77 |
+
## π Assignment Goals Covered
|
| 78 |
+
|
| 79 |
+
- β
MVP AI chatbot with multiple generative models
|
| 80 |
+
- β
Embeddings + Bayesian-style sampling
|
| 81 |
+
- β
PyTorch backend (via Hugging Face Transformers)
|
| 82 |
+
- β
MLOps-ready with Docker and GitHub Actions-ready design
|
| 83 |
+
- β
Deployable on Hugging Face Spaces (CPU Basic)
|
| 84 |
+
|
| 85 |
---
|
| 86 |
|
| 87 |
## π License
|
| 88 |
|
| 89 |
+
MIT License β Free for educational and non-commercial use.
|