barunsaha commited on
Commit
c8feae1
1 Parent(s): 842b75a

Convert slide contents into JSON automatically without requiring a button click

Browse files
Files changed (2) hide show
  1. app.py +5 -5
  2. llm_helper.py +1 -1
app.py CHANGED
@@ -150,13 +150,13 @@ def process_topic_inputs(topic: str, progress_bar):
150
  # Apparently, "nested button click" needs to be handled differently
151
  # https://playground.streamlit.app/?q=triple-button
152
 
153
- st.button(APP_TEXT['button_labels'][1], on_click=button_clicked, args=[1])
154
 
155
- if st.session_state.clicked[1]:
156
- progress_text = 'Converting...give it a moment'
157
- progress_bar = st.progress(0, text=progress_text)
158
 
159
- process_slides_contents(slides_content, progress_bar)
160
  except ValueError as ve:
161
  st.error(f'Unfortunately, an error occurred: {ve}! '
162
  f'Please change the text, try again later, or report it, sharing your inputs.')
 
150
  # Apparently, "nested button click" needs to be handled differently
151
  # https://playground.streamlit.app/?q=triple-button
152
 
153
+ # st.button(APP_TEXT['button_labels'][1], on_click=button_clicked, args=[1])
154
 
155
+ # if st.session_state.clicked[1]:
156
+ progress_text = 'Converting...give it a moment'
157
+ progress_bar = st.progress(0, text=progress_text)
158
 
159
+ process_slides_contents(slides_content, progress_bar)
160
  except ValueError as ve:
161
  st.error(f'Unfortunately, an error occurred: {ve}! '
162
  f'Please change the text, try again later, or report it, sharing your inputs.')
llm_helper.py CHANGED
@@ -171,7 +171,7 @@ def get_related_websites(query: str) -> metaphor.api.SearchResponse:
171
  :param query: The query text
172
  :return: The search results object
173
  """
174
-
175
  global metaphor_client
176
 
177
  if not metaphor_client:
 
171
  :param query: The query text
172
  :return: The search results object
173
  """
174
+
175
  global metaphor_client
176
 
177
  if not metaphor_client: