Spaces:
Runtime error
Runtime error
MJ
commited on
Commit
·
b241691
1
Parent(s):
43c3923
Fixed Output error
Browse files
app.py
CHANGED
@@ -6,7 +6,9 @@ def run_model():
|
|
6 |
classifier = pipeline(task="sentiment-analysis",
|
7 |
model=models_available[model_picked])
|
8 |
analysis = classifier(text_input)
|
9 |
-
|
|
|
|
|
10 |
|
11 |
|
12 |
models_available = {"Roberta Large English": "siebert/sentiment-roberta-large-english",
|
@@ -19,5 +21,3 @@ model_picked = st.selectbox(
|
|
19 |
"Choose a model to run on", options=models_available.keys())
|
20 |
|
21 |
st.button("Submit", run_model())
|
22 |
-
|
23 |
-
run_model()
|
|
|
6 |
classifier = pipeline(task="sentiment-analysis",
|
7 |
model=models_available[model_picked])
|
8 |
analysis = classifier(text_input)
|
9 |
+
for output in analysis:
|
10 |
+
st.markdown("Sentiment: ",
|
11 |
+
output["label"], "Score: ", output["score"])
|
12 |
|
13 |
|
14 |
models_available = {"Roberta Large English": "siebert/sentiment-roberta-large-english",
|
|
|
21 |
"Choose a model to run on", options=models_available.keys())
|
22 |
|
23 |
st.button("Submit", run_model())
|
|
|
|