Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,8 @@ MODEL_LIST = [
|
|
| 24 |
("ZombitX64/Sentiment-02", "🔬 Sentiment v2"),
|
| 25 |
("ZombitX64/Sentiment-03", "🔬 Sentiment v3"),
|
| 26 |
("ZombitX64/sentiment-103", "🔬 Sentiment 103"),
|
| 27 |
-
("ZombitX64/sentimentSumdata-v1", "🔬 sentimentSumdata-v1"),
|
|
|
|
| 28 |
]
|
| 29 |
|
| 30 |
# Cache for model loading
|
|
@@ -38,6 +39,14 @@ def get_nlp(model_name: str):
|
|
| 38 |
|
| 39 |
# Model-specific label mappings
|
| 40 |
MODEL_LABEL_MAPPINGS = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
# MultiSent E5 Pro - 4 classes (question, negative, neutral, positive)
|
| 42 |
"ZombitX64/MultiSent-E5-Pro": {
|
| 43 |
"LABEL_0": {"code": 0, "name": "question", "emoji": "🤔", "color": "#60a5fa", "bg": "rgba(96, 165, 250, 0.2)", "description": "คำถาม"},
|
|
|
|
| 24 |
("ZombitX64/Sentiment-02", "🔬 Sentiment v2"),
|
| 25 |
("ZombitX64/Sentiment-03", "🔬 Sentiment v3"),
|
| 26 |
("ZombitX64/sentiment-103", "🔬 Sentiment 103"),
|
| 27 |
+
("ZombitX64/sentimentSumdata-v1", "🔬 sentimentSumdata-v1"),
|
| 28 |
+
("ZombitX64/wangchanberta-att-spm-uncased-sentiment"),"wangchanberta-att-spm-uncased-sentiment"),
|
| 29 |
]
|
| 30 |
|
| 31 |
# Cache for model loading
|
|
|
|
| 39 |
|
| 40 |
# Model-specific label mappings
|
| 41 |
MODEL_LABEL_MAPPINGS = {
|
| 42 |
+
|
| 43 |
+
# wangchanberta-att-spm-uncased-sentiment - 3 classes ( negative, neutral, positive)
|
| 44 |
+
"ZombitX64/wangchanberta-att-spm-uncased-sentiment": {
|
| 45 |
+
"LABEL_0": {"code": 0, "name": "negative", "emoji": "🤔", "color": "#60a5fa", "bg": "rgba(96, 165, 250, 0.2)", "description": "เชิงลบ"},
|
| 46 |
+
"LABEL_1": {"code": 1, "name": "neutral", "emoji": "😢", "color": "#f87171", "bg": "rgba(248, 113, 113, 0.2)", "description": "เป็นกลาง"},
|
| 47 |
+
"LABEL_2": {"code": 2, "name": "positive", "emoji": "😐", "color": "#facc15", "bg": "rgba(250, 204, 21, 0.2)", "description": "เชิงบวก"},
|
| 48 |
+
},
|
| 49 |
+
|
| 50 |
# MultiSent E5 Pro - 4 classes (question, negative, neutral, positive)
|
| 51 |
"ZombitX64/MultiSent-E5-Pro": {
|
| 52 |
"LABEL_0": {"code": 0, "name": "question", "emoji": "🤔", "color": "#60a5fa", "bg": "rgba(96, 165, 250, 0.2)", "description": "คำถาม"},
|