Ransaka commited on
Commit
4c8d160
1 Parent(s): 2113989

Minor changes in cluster results tab

Browse files
Files changed (1) hide show
  1. app.py +7 -14
app.py CHANGED
@@ -57,24 +57,17 @@ if selected_tab == "Sentences Similarity":
57
  st.write(sentence)
58
 
59
  elif selected_tab == "Clustering Results":
60
- st.title("Clustering Results Tab")
61
 
62
  # Display PNG image
63
- st.subheader("Static PNG File")
64
  st.image(image, use_column_width=False, caption='Static PNG File',width=750)
65
 
66
- altair_chart = alt.Chart(chart_data).mark_circle().encode(
67
- x='x',
68
- y='y',
69
- color='labels',
70
- tooltip='Headline'
71
- ).properties(
72
- width=750,
73
- height=500
74
- ).interactive()
75
- # Display chart
76
- st.subheader("Interactive Chart for top clusters")
77
- st.altair_chart(altair_chart, use_container_width=False, theme="streamlit")
78
 
79
  # Dropdown functionality to update DataFrame
80
  st.subheader("Select a cluster")
 
57
  st.write(sentence)
58
 
59
  elif selected_tab == "Clustering Results":
60
+ st.title("Clustering Results")
61
 
62
  # Display PNG image
63
+ st.subheader("Full Clustering Results")
64
  st.image(image, use_column_width=False, caption='Static PNG File',width=750)
65
 
66
+ with st.spinner('Loading Interactive Results...'):
67
+ # Display Altair chart
68
+ st.subheader("Interactive Chart")
69
+ chart = alt.Chart(chart_data).mark_circle(size=60).encode(x='x', y='y', color='labels', tooltip=['Headline']).interactive()
70
+ st.altair_chart(chart, use_container_width=True)
 
 
 
 
 
 
 
71
 
72
  # Dropdown functionality to update DataFrame
73
  st.subheader("Select a cluster")