green commited on
Commit
1b0c07e
·
1 Parent(s): 3817011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -178,14 +178,14 @@ 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
-
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
  # button to refresh topics
188
- if st.button("Refresh topics!"):
189
  article_dict, clusters = initialize(LIMIT, USE_CACHE)
190
 
191
  selections = []
@@ -197,8 +197,8 @@ 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
- st.write("Smaller chunks means more of the article included in the summary and a longer digest.")
201
- chunk_size = st.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
+ col1, col2 = st.columns([3, 1])
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
+ 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 = []
 
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)