Spaces:
Runtime error
Runtime error
Update sentiment-analyser.py
Browse files- sentiment-analyser.py +1 -1
sentiment-analyser.py
CHANGED
@@ -14,7 +14,7 @@ def classification(user_input, type):
|
|
14 |
if type=="sentiment-analysis":
|
15 |
classifier = pipeline("sentiment-analysis")
|
16 |
elif type=="twitter-xlm-roberta-base-sentiment":
|
17 |
-
tokenizer=AutoTokenizer.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment", use_fast=
|
18 |
classifier = pipeline("sentiment-analysis", model="cardiffnlp/twitter-xlm-roberta-base-sentiment", tokenizer=tokenizer)
|
19 |
result = classifier(user_input)[0]
|
20 |
return result
|
|
|
14 |
if type=="sentiment-analysis":
|
15 |
classifier = pipeline("sentiment-analysis")
|
16 |
elif type=="twitter-xlm-roberta-base-sentiment":
|
17 |
+
tokenizer=AutoTokenizer.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment", use_fast=True)
|
18 |
classifier = pipeline("sentiment-analysis", model="cardiffnlp/twitter-xlm-roberta-base-sentiment", tokenizer=tokenizer)
|
19 |
result = classifier(user_input)[0]
|
20 |
return result
|