Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import torch
|
|
3 |
from transformers import AutoModelForSequenceClassification,AutoTokenizer,pipeline
|
4 |
|
5 |
model = AutoModelForSequenceClassification.from_pretrained('SeyedAli/Persian-Text-Sentiment-Bert-V1')
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained('SeyedAli/Persian-Text-Sentiment-Bert-V1')
|
7 |
|
8 |
def Sentiment(text):
|
9 |
pipline = pipeline(task="text-classification", model=model, tokenizer=tokenizer)
|
|
|
3 |
from transformers import AutoModelForSequenceClassification,AutoTokenizer,pipeline
|
4 |
|
5 |
model = AutoModelForSequenceClassification.from_pretrained('SeyedAli/Persian-Text-Sentiment-Bert-V1')
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained('SeyedAli/Persian-Text-Sentiment-Bert-V1',add_special_token=True)
|
7 |
|
8 |
def Sentiment(text):
|
9 |
pipline = pipeline(task="text-classification", model=model, tokenizer=tokenizer)
|