akdeniz27 commited on
Commit
6fb9fd9
1 Parent(s): 4419326

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
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
- 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
- import plotly.graph_objects as go
66
- fig = go.Figure([go.Bar(x=output_labels, y=output_scores)])
67
- st.plotly_chart(fig, use_container_width=False, sharing="streamlit")
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