green commited on
Commit
570b5ec
·
1 Parent(s): aabb21b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -23
app.py CHANGED
@@ -229,31 +229,10 @@ choices.insert(0,'None')
229
  # st.write(f"NPR articles: {st.session_state['npr']}")
230
  # st.write(f"Number of clusters {st.session_state['num_clusters']}")
231
 
232
- html = """
233
- <style>
234
- .reportview-container {
235
- flex-direction: row-reverse;
236
- }
237
-
238
- .sidebar .sidebar-content {
239
- transition: margin-right .3s, box-shadow .3s;
240
- }
241
-
242
- .sidebar.--collapsed .sidebar-content {
243
- margin-left: auto;
244
- margin-right: -21rem;
245
- }
246
-
247
- @media (max-width: 991.98px) {
248
- .sidebar .sidebar-content {
249
- margin-left: auto;
250
- }
251
- }
252
- </style>
253
- """
254
- st.markdown(html, unsafe_allow_html=True)
255
 
256
  st.sidebar.subheader("Topics")
 
 
257
  for i in list(clusters.keys()):
258
  st.sidebar.write(f"{i} : {len(clusters[i])}")
259
 
 
229
  # st.write(f"NPR articles: {st.session_state['npr']}")
230
  # st.write(f"Number of clusters {st.session_state['num_clusters']}")
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
 
233
  st.sidebar.subheader("Topics")
234
+ show_clusters = clusters
235
+ show_clusters.sort(key=lambda x: len(clusters[x]))
236
  for i in list(clusters.keys()):
237
  st.sidebar.write(f"{i} : {len(clusters[i])}")
238