Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
88 |
with col1:
|
89 |
-
st.
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
94 |
|
95 |
-
if
|
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:
|