winain7788 commited on
Commit
4d20f8e
·
1 Parent(s): 017818e

change model

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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("sentiment-analysis", device=device)
 
 
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)