Spaces:
Runtime error
Runtime error
Commit
·
b6fa0f7
1
Parent(s):
782e58c
Update app.py (#2)
Browse files- Update app.py (39ba867ed3db8689c92032803bd3a9a59fd4149c)
Co-authored-by: Israel Anaba Ayamga <[email protected]>
app.py
CHANGED
@@ -3,11 +3,8 @@ import pandas as pd
|
|
3 |
import numpy as np
|
4 |
import pickle
|
5 |
from scipy.special import softmax
|
6 |
-
# import transfomers
|
7 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer, AutoConfig
|
8 |
-
|
9 |
-
# from transformers import TFAutoModelForSequenceClassification
|
10 |
-
# from transformers import AutoTokenizer, AutoConfig
|
11 |
|
12 |
# Requirements
|
13 |
model_path = "IsaacSarps/sentiment_analysis"
|
@@ -45,7 +42,10 @@ demo = gr.Interface(
|
|
45 |
inputs=gr.Textbox(placeholder="Share your thoughts on COVID vaccines..."),
|
46 |
outputs="label",
|
47 |
interpretation="default",
|
48 |
-
examples=[["I feel confident about covid vaccines."]
|
|
|
|
|
|
|
49 |
title="COVID Vaccine Sentiment Analysis",
|
50 |
description="An AI model that predicts sentiment about COVID vaccines, providing labels and probabilities for 'NEGATIVE', 'NEUTRAL', and 'POSITIVE' sentiments.",
|
51 |
theme="default",
|
|
|
3 |
import numpy as np
|
4 |
import pickle
|
5 |
from scipy.special import softmax
|
|
|
6 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer, AutoConfig
|
7 |
+
|
|
|
|
|
8 |
|
9 |
# Requirements
|
10 |
model_path = "IsaacSarps/sentiment_analysis"
|
|
|
42 |
inputs=gr.Textbox(placeholder="Share your thoughts on COVID vaccines..."),
|
43 |
outputs="label",
|
44 |
interpretation="default",
|
45 |
+
examples=[["I feel confident about covid vaccines."]
|
46 |
+
["i do not like the covid vaccine"],
|
47 |
+
["i like the covid vaccine"],
|
48 |
+
["the covid vaccine is effective"]],
|
49 |
title="COVID Vaccine Sentiment Analysis",
|
50 |
description="An AI model that predicts sentiment about COVID vaccines, providing labels and probabilities for 'NEGATIVE', 'NEUTRAL', and 'POSITIVE' sentiments.",
|
51 |
theme="default",
|