Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +10 -3
src/streamlit_app.py
CHANGED
|
@@ -57,12 +57,19 @@ st.sidebar.write("Press Submit to process:")
|
|
| 57 |
process = st.sidebar.button("Submit")
|
| 58 |
|
| 59 |
#Document processing to convert it into vectors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
if process:
|
| 61 |
-
if uploaded_file:
|
| 62 |
-
# Process the uploaded PDF file
|
| 63 |
process_pdf(uploaded_file)
|
| 64 |
else:
|
| 65 |
-
st.warning("Please upload
|
|
|
|
| 66 |
|
| 67 |
if input_method == "Choose input method...":
|
| 68 |
st.title(f"Welcome You all!")
|
|
|
|
| 57 |
process = st.sidebar.button("Submit")
|
| 58 |
|
| 59 |
#Document processing to convert it into vectors
|
| 60 |
+
# if process:
|
| 61 |
+
# if uploaded_file:
|
| 62 |
+
# # Process the uploaded PDF file
|
| 63 |
+
# process_pdf(uploaded_file)
|
| 64 |
+
# else:
|
| 65 |
+
# st.warning("Please upload a PDF file.")
|
| 66 |
+
|
| 67 |
if process:
|
| 68 |
+
if uploaded_file is not None and isinstance(uploaded_file, list) and len(uploaded_file) > 0:
|
|
|
|
| 69 |
process_pdf(uploaded_file)
|
| 70 |
else:
|
| 71 |
+
st.warning("Please upload at least one PDF file.")
|
| 72 |
+
|
| 73 |
|
| 74 |
if input_method == "Choose input method...":
|
| 75 |
st.title(f"Welcome You all!")
|