Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -72,14 +72,16 @@ def main():
|
|
72 |
api_key = st.secrets["inference_api_key"]
|
73 |
|
74 |
# Sidebar column for file upload
|
75 |
-
st.sidebar
|
76 |
-
|
77 |
-
|
78 |
# Main column for displaying extracted text and user interaction
|
79 |
col1, col2 = st.columns([1, 2])
|
80 |
|
81 |
if pdf_docs and col1.button("Submit"):
|
82 |
-
with col1
|
|
|
|
|
83 |
raw_text = get_pdf_text(pdf_docs)
|
84 |
text_chunks = get_text_chunks(raw_text)
|
85 |
get_vector_store(text_chunks, api_key)
|
|
|
72 |
api_key = st.secrets["inference_api_key"]
|
73 |
|
74 |
# Sidebar column for file upload
|
75 |
+
with st.sidebar:
|
76 |
+
# st.header("Chat with PDF")
|
77 |
+
|
78 |
# Main column for displaying extracted text and user interaction
|
79 |
col1, col2 = st.columns([1, 2])
|
80 |
|
81 |
if pdf_docs and col1.button("Submit"):
|
82 |
+
with col1:
|
83 |
+
pdf_docs = st.sidebar.file_uploader("Upload your PDF Files", accept_multiple_files=True, type=["pdf"])
|
84 |
+
st.spinner("Processing..."):
|
85 |
raw_text = get_pdf_text(pdf_docs)
|
86 |
text_chunks = get_text_chunks(raw_text)
|
87 |
get_vector_store(text_chunks, api_key)
|