Spaces:
Sleeping
Sleeping
Commit
·
4d20f8e
1
Parent(s):
017818e
change model
Browse files
app.py
CHANGED
@@ -4,7 +4,9 @@ from transformers import pipeline
|
|
4 |
|
5 |
device = 0 if torch.cuda.is_available() else -1
|
6 |
|
7 |
-
sentiment_pipeline = pipeline("
|
|
|
|
|
8 |
|
9 |
async def get_sentiment(text):
|
10 |
return sentiment_pipeline(text)
|
|
|
4 |
|
5 |
device = 0 if torch.cuda.is_available() else -1
|
6 |
|
7 |
+
sentiment_pipeline = pipeline("text-classification",
|
8 |
+
model="3728km/fined-tune-thai-sentiment",
|
9 |
+
device=device)
|
10 |
|
11 |
async def get_sentiment(text):
|
12 |
return sentiment_pipeline(text)
|