Spaces:
Sleeping
Sleeping
Commit
•
b9bcaa7
1
Parent(s):
1c5b3c4
Update app.py (#1)
Browse files- Update app.py (995bc9af956718db4db522d3ec81a0aa2152782c)
Co-authored-by: vicky A <Mr-Vicky-01@users.noreply.huggingface.co>
app.py
CHANGED
@@ -98,9 +98,9 @@ st.header("Chat with your pdf💁")
|
|
98 |
with st.sidebar:
|
99 |
st.title("PDF FILE UPLOAD:")
|
100 |
pdf_docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
|
101 |
-
|
102 |
query = st.chat_input("Ask a Question from the PDF File")
|
103 |
-
if query:
|
104 |
raw_text = get_pdf(pdf_docs)
|
105 |
text_chunks = text_splitter(raw_text)
|
106 |
st.session_state.messages.append({'role': 'user', "content": query})
|
|
|
98 |
with st.sidebar:
|
99 |
st.title("PDF FILE UPLOAD:")
|
100 |
pdf_docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
|
101 |
+
|
102 |
query = st.chat_input("Ask a Question from the PDF File")
|
103 |
+
if query and pdf_docs:
|
104 |
raw_text = get_pdf(pdf_docs)
|
105 |
text_chunks = text_splitter(raw_text)
|
106 |
st.session_state.messages.append({'role': 'user', "content": query})
|