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