SeyedAli commited on
Commit
1f45a5d
1 Parent(s): 9f2e705

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)