Update app.py
Browse files
app.py
CHANGED
@@ -53,17 +53,16 @@ elif labels == "New Label List":
|
|
53 |
candidate_labels = st.text_area("New Label List (Pls Input as comma-separated)", value="", height=16).split(",")
|
54 |
|
55 |
hypothesis_template = "Bu yazı {} konusundadır."
|
56 |
-
|
57 |
|
58 |
Run_Button = st.button("Run", key=None)
|
59 |
if Run_Button == True:
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
|
|
|
53 |
candidate_labels = st.text_area("New Label List (Pls Input as comma-separated)", value="", height=16).split(",")
|
54 |
|
55 |
hypothesis_template = "Bu yazı {} konusundadır."
|
|
|
56 |
|
57 |
Run_Button = st.button("Run", key=None)
|
58 |
if Run_Button == True:
|
59 |
+
with st.spinner('Model is running...'):
|
60 |
+
output = runModel(model_name, sequence_to_classify, candidate_labels, hypothesis_template)
|
61 |
+
output_labels = list(output.keys())
|
62 |
+
output_scores = list(output.values())
|
63 |
+
|
64 |
+
st.header("Result")
|
65 |
+
fig = go.Figure([go.Bar(x=output_labels, y=output_scores)])
|
66 |
+
st.plotly_chart(fig, use_container_width=False, sharing="streamlit")
|
67 |
+
st.success('Done!')
|
68 |
|