Huzaifa367 commited on
Commit
df11cb0
·
verified ·
1 Parent(s): 3f2c2fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -84,15 +84,16 @@ def main():
84
  # Initialize raw_text as None initially
85
  raw_text = None
86
 
87
- if pdf_docs and col1.button("Submit"):
88
  with col1:
89
- st.spinner("Processing...")
90
- raw_text = get_pdf_text(pdf_docs)
91
- text_chunks = get_text_chunks(raw_text)
92
- get_vector_store(text_chunks, api_key)
93
- st.success("Processing Complete")
 
94
 
95
- if pdf_docs and st.success("Processing Complete"):
96
  with col1:
97
  user_question = st.text_input("Ask a question from the Docs")
98
  if user_question:
 
84
  # Initialize raw_text as None initially
85
  raw_text = None
86
 
87
+ if pdf_docs:
88
  with col1:
89
+ if st.button("Submit"):
90
+ with st.spinner("Processing..."):
91
+ raw_text = get_pdf_text(pdf_docs)
92
+ text_chunks = get_text_chunks(raw_text)
93
+ get_vector_store(text_chunks, api_key)
94
+ st.success("Processing Complete")
95
 
96
+ if st.success("Processing Complete"):
97
  with col1:
98
  user_question = st.text_input("Ask a question from the Docs")
99
  if user_question: