Update backend/api.py
Browse files- backend/api.py +8 -3
backend/api.py
CHANGED
|
@@ -95,9 +95,14 @@ async def chatbot(req: ChatRequest):
|
|
| 95 |
|
| 96 |
# === Mapping ID ke label ===
|
| 97 |
id2label = {
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
# Nilai 'intent' yang benar disimpan di sini
|
| 103 |
intent = id2label.get(pred_id, "fallback")
|
|
|
|
| 95 |
|
| 96 |
# === Mapping ID ke label ===
|
| 97 |
id2label = {
|
| 98 |
+
0: "about_me",
|
| 99 |
+
1: "career_goal",
|
| 100 |
+
2: "experience",
|
| 101 |
+
3: "fallback",
|
| 102 |
+
4: "greeting",
|
| 103 |
+
5: "projects",
|
| 104 |
+
6: "skills",
|
| 105 |
+
}
|
| 106 |
|
| 107 |
# Nilai 'intent' yang benar disimpan di sini
|
| 108 |
intent = id2label.get(pred_id, "fallback")
|