joshuadunlop commited on
Commit
f3af12d
·
1 Parent(s): 7344a31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -160,6 +160,18 @@ row_count = st.session_state.get("row_count", 1)
160
  num_concurrent_calls = st.sidebar.number_input("Concurrent Calls:", min_value=1, max_value=2000, value=10, step=1)
161
  generate_all = st.sidebar.button("Generate All")
162
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  if add_row:
164
  row_count += 1
165
  st.session_state.row_count = row_count
 
160
  num_concurrent_calls = st.sidebar.number_input("Concurrent Calls:", min_value=1, max_value=2000, value=10, step=1)
161
  generate_all = st.sidebar.button("Generate All")
162
 
163
+ reset = st.sidebar.button("Reset")
164
+
165
+ if reset:
166
+ for i in range(row_count):
167
+ st.session_state[f"url{i}"] = ''
168
+ st.session_state[f"question{i}"] = ''
169
+ st.session_state[f'session_answer{i}'] = ''
170
+
171
+ st.session_state.row_count = 1
172
+
173
+ st.experimental_rerun()
174
+
175
  if add_row:
176
  row_count += 1
177
  st.session_state.row_count = row_count