Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- text-classification
|
4 |
+
- intent-classification
|
5 |
+
- moviebot
|
6 |
+
- distilbert
|
7 |
+
- huggingface-pipeline
|
8 |
+
- gradio-app
|
9 |
+
datasets:
|
10 |
+
- custom
|
11 |
+
language: en
|
12 |
+
license: mit
|
13 |
+
widget:
|
14 |
+
- text: "Can you recommend a good comedy?"
|
15 |
+
- text: "Who directed Inception?"
|
16 |
+
- text: "Do you like movies?"
|
17 |
+
---
|
18 |
+
|
19 |
+
# 🎬 DistilBERT Intent Classifier for Movie & TV Assistant
|
20 |
+
|
21 |
+
This model is a fine-tuned DistilBERT-based intent classifier for a conversational movie recommendation assistant. It classifies user queries into one of three intents:
|
22 |
+
|
23 |
+
- **`generic`** – general small talk or casual movie mentions
|
24 |
+
- **`recommendation`** – requests for movie or TV suggestions
|
25 |
+
- **`factual`** – questions about movie facts, cast, streaming availability, etc.
|
26 |
+
|
27 |
+
## 🧠 Model Details
|
28 |
+
|
29 |
+
- **Base model:** `distilbert-base-uncased`
|
30 |
+
- **Training data:** 6,000+ custom-labeled queries across all 3 intents
|
31 |
+
- **Special augmentations:**
|
32 |
+
- Out-of-domain recommendation phrasing (e.g. restaurants, gadgets)
|
33 |
+
- Thematic recommendation queries (e.g. “movies for Valentine’s Day”)
|
34 |
+
- **Use case:** Used inside a RAG-based chatbot for intent-routing and retrieval logic
|
35 |
+
|
36 |
+
## ✨ Example Predictions
|
37 |
+
|
38 |
+
| Input | Predicted Intent |
|
39 |
+
|-------|------------------|
|
40 |
+
| "Can you recommend a good horror movie?" | recommendation |
|
41 |
+
| "Who directed Parasite?" | factual |
|
42 |
+
| "Do you like sci-fi shows?" | generic |
|
43 |
+
| "Suggest restaurants in Rome?" | generic (OOD) |
|
44 |
+
|
45 |
+
## 🚀 Usage
|
46 |
+
|
47 |
+
```python
|
48 |
+
from transformers import pipeline
|
49 |
+
|
50 |
+
classifier = pipeline("text-classification", model="your-username/intent-classifier-distilbert-moviebot")
|
51 |
+
|
52 |
+
query = "Can you suggest a good action movie?"
|
53 |
+
result = classifier(query, top_k=None)
|
54 |
+
print(result)
|