Spaces:
Runtime error
Runtime error
Ariel Hsieh
commited on
update
Browse files
app.py
CHANGED
@@ -12,6 +12,10 @@ model = st.selectbox("Which pretrained model would you like to use?",("roberta-l
|
|
12 |
#data = pd.DataFrame(data=d)
|
13 |
#st.table(data)
|
14 |
|
|
|
|
|
|
|
|
|
15 |
if model == "roberta-large-mnli":
|
16 |
#1
|
17 |
if st.button("Run Sentiment Analysis of Text"):
|
@@ -21,8 +25,8 @@ if model == "roberta-large-mnli":
|
|
21 |
label = result[0]["label"]
|
22 |
score = result[0]["score"]
|
23 |
d = {'tweet':[model_path],'classification':[label],'score':[score]}
|
24 |
-
|
25 |
-
st.table(
|
26 |
#st.write("The classification of the given text is " + label + " with a score of " + str(score))
|
27 |
|
28 |
|
|
|
12 |
#data = pd.DataFrame(data=d)
|
13 |
#st.table(data)
|
14 |
|
15 |
+
data = []
|
16 |
+
text = st.text_input("Enter text here:","Artificial Intelligence is useful")
|
17 |
+
data.append(text)
|
18 |
+
|
19 |
if model == "roberta-large-mnli":
|
20 |
#1
|
21 |
if st.button("Run Sentiment Analysis of Text"):
|
|
|
25 |
label = result[0]["label"]
|
26 |
score = result[0]["score"]
|
27 |
d = {'tweet':[model_path],'classification':[label],'score':[score]}
|
28 |
+
dataframe = pd.DataFrame(data=d)
|
29 |
+
st.table(dataframe)
|
30 |
#st.write("The classification of the given text is " + label + " with a score of " + str(score))
|
31 |
|
32 |
|