Update app.py
Browse files
app.py
CHANGED
@@ -71,14 +71,14 @@ def setModel(model_checkpoint):
|
|
71 |
Run_Button = st.button("Run", key=None)
|
72 |
if Run_Button == True:
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
|
|
|
71 |
Run_Button = st.button("Run", key=None)
|
72 |
if Run_Button == True:
|
73 |
|
74 |
+
with st.spinner('Model is running...'):
|
75 |
+
zstc_pipeline = setModel(model_checkpoint)
|
76 |
+
output = zstc_pipeline(sequences=selected_text, candidate_labels=selected_labels)
|
77 |
+
output_labels = output["labels"]
|
78 |
+
output_scores = output["scores"]
|
79 |
+
|
80 |
+
st.header("Result")
|
81 |
+
fig = go.Figure([go.Bar(x=output_labels, y=output_scores)])
|
82 |
+
st.plotly_chart(fig, use_container_width=False, sharing="streamlit")
|
83 |
+
st.success('Done!')
|
84 |
|