will702 commited on
Commit
ea72b54
·
verified ·
1 Parent(s): ae8739a

Upload 4 files

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,17 +5,17 @@ from fastapi import FastAPI, HTTPException, Request
5
  from pydantic import BaseModel
6
  from transformers import pipeline
7
 
8
- MODEL_NAME = "ihsan31415/indo-roBERTa-financial-sentiment"
9
  API_KEY = os.getenv("API_KEY")
10
 
11
- # Label mapping — flipped: 0=Positive, 1=Neutral, 2=Negative
12
  LABEL_MAP = {
13
- "label_0": "positive",
14
- "label_1": "neutral",
15
- "label_2": "negative",
16
  "positive": "positive",
17
  "neutral": "neutral",
18
  "negative": "negative",
 
 
 
19
  }
20
 
21
  classifier = None
 
5
  from pydantic import BaseModel
6
  from transformers import pipeline
7
 
8
+ MODEL_NAME = "ayameRushia/bert-base-indonesian-1.5G-sentiment-analysis-smsa"
9
  API_KEY = os.getenv("API_KEY")
10
 
11
+ # Label mapping — IndoNLU SMSA labels
12
  LABEL_MAP = {
 
 
 
13
  "positive": "positive",
14
  "neutral": "neutral",
15
  "negative": "negative",
16
+ "label_0": "positive",
17
+ "label_1": "neutral",
18
+ "label_2": "negative",
19
  }
20
 
21
  classifier = None