stevafernandes commited on
Commit
f552360
·
verified ·
1 Parent(s): 26160e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -85,7 +85,7 @@ def main():
85
  if st.button("Continue", type="primary") and user_api_key:
86
  st.session_state["user_api_key"] = user_api_key
87
  st.session_state["api_entered"] = True
88
- st.rerun()
89
  st.stop()
90
  else:
91
  st.session_state["user_api_key"] = api_key
@@ -116,7 +116,7 @@ def main():
116
  get_vector_store(text_chunks, api_key)
117
  st.session_state["pdf_processed"] = True
118
  st.success(" PDFs processed successfully! You can now ask questions.")
119
- st.rerun()
120
  except Exception as e:
121
  st.error(f" Error processing PDFs: {str(e)}")
122
  st.stop()
@@ -136,7 +136,7 @@ def main():
136
  with col2:
137
  if st.button(" Upload New PDFs"):
138
  st.session_state["pdf_processed"] = False
139
- st.rerun()
140
 
141
  # Question input
142
  user_question = st.text_input(
 
85
  if st.button("Continue", type="primary") and user_api_key:
86
  st.session_state["user_api_key"] = user_api_key
87
  st.session_state["api_entered"] = True
88
+ st.experimental_rerun()
89
  st.stop()
90
  else:
91
  st.session_state["user_api_key"] = api_key
 
116
  get_vector_store(text_chunks, api_key)
117
  st.session_state["pdf_processed"] = True
118
  st.success(" PDFs processed successfully! You can now ask questions.")
119
+ st.experimental_rerun()
120
  except Exception as e:
121
  st.error(f" Error processing PDFs: {str(e)}")
122
  st.stop()
 
136
  with col2:
137
  if st.button(" Upload New PDFs"):
138
  st.session_state["pdf_processed"] = False
139
+ st.experimental_rerun()
140
 
141
  # Question input
142
  user_question = st.text_input(