green commited on
Commit
d7a972e
1 Parent(s): 21a972c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -178,15 +178,19 @@ article_dict, clusters = initialize(LIMIT, USE_CACHE)
178
  # We call a display function and get the user input.
179
  # For this its still streamlit.
180
 
181
- col1, col2 = st.columns([2, 1])
182
- col1.success(f"Welcome to TopicDig! \nYou select the topics, we summarize the relevant news and show you a digest, plus some info to help contextualize what the machine did. Enjoy, and remember, this software is experimental, and honestly may produce untrue summaries. \nFor more information on truthfulness and automatic summarization with transformers see TK.")
183
 
 
184
 
185
- col1.write(f"""How it works: \nSelect 1 to 3 topics from the drop down menus and click 'submit' to start generating your summary!""")
186
 
187
- # button to refresh topics
188
- if col2.button("Refresh topics!"):
189
- article_dict, clusters = initialize(LIMIT, USE_CACHE)
 
 
 
 
 
 
190
 
191
  selections = []
192
  choices = list(clusters.keys())
@@ -197,8 +201,6 @@ choices.insert(0,'None')
197
  # st.write(f"Number of clusters {st.session_state['num_clusters']}")
198
 
199
  st.session_state['dt'] = dt.now()
200
- col2.write("Smaller chunks means more of the article included in the summary and a longer digest.")
201
- chunk_size = col2.select_slider(label="Slider", options=[i for i in range(50,801,50)], value=400)
202
  # Form used to take 3 menu inputs
203
  with st.form(key='columns_in_form'):
204
  cols = st.columns(3)
 
178
  # We call a display function and get the user input.
179
  # For this its still streamlit.
180
 
 
 
181
 
182
+ st.success(f"Welcome to TopicDig! \nYou select the topics, we summarize the relevant news and show you a digest, plus some info to help contextualize what the machine did. Enjoy, and remember, this software is experimental, and honestly may produce untrue summaries. \nFor more information on truthfulness and automatic summarization with transformers see TK.")
183
 
 
184
 
185
+ st.write(f"""How it works: \nSelect 1 to 3 topics from the drop down menus and click 'submit' to start generating your summary!""")
186
+
187
+ with st.expander("See extra options"):
188
+ st.write("You may want to refresh the topic lists if the app loaded several hours ago or you get no summary.")
189
+ # button to refresh topics
190
+ if st.button("Refresh topics!"):
191
+ article_dict, clusters = initialize(LIMIT, USE_CACHE)
192
+ st.write("Select chunk size-- \nSmaller chunks means more of the article included in the summary and a longer digest.")
193
+ chunk_size = col2.select_slider(label="Slider", options=[i for i in range(50,801,50)], value=400)
194
 
195
  selections = []
196
  choices = list(clusters.keys())
 
201
  # st.write(f"Number of clusters {st.session_state['num_clusters']}")
202
 
203
  st.session_state['dt'] = dt.now()
 
 
204
  # Form used to take 3 menu inputs
205
  with st.form(key='columns_in_form'):
206
  cols = st.columns(3)