Spaces:
Sleeping
Sleeping
Chandranshu Jain
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ Follow these simple steps to interact with the chatbot:
|
|
34 |
|
35 |
def get_pdf(pdf_file):
|
36 |
# Extract file path from UploadedFile object
|
37 |
-
loader = PyPDFLoader(pdf_file)
|
38 |
docs = loader.load()
|
39 |
return docs
|
40 |
|
@@ -77,7 +77,7 @@ def embedding(chunk,query):
|
|
77 |
def main():
|
78 |
st.header("Chat with your pdf💁")
|
79 |
st.title("Menu:")
|
80 |
-
pdf_docs = st.file_uploader("Upload your PDF Files and Click on the Submit & Process Button", accept_multiple_files=
|
81 |
query = st.text_input("Ask a Question from the PDF Files", key="query")
|
82 |
if st.button("Submit & Process", key="process_button"):
|
83 |
with st.spinner("Processing..."):
|
|
|
34 |
|
35 |
def get_pdf(pdf_file):
|
36 |
# Extract file path from UploadedFile object
|
37 |
+
loader = PyPDFLoader(pdf_file.name)
|
38 |
docs = loader.load()
|
39 |
return docs
|
40 |
|
|
|
77 |
def main():
|
78 |
st.header("Chat with your pdf💁")
|
79 |
st.title("Menu:")
|
80 |
+
pdf_docs = st.file_uploader("Upload your PDF Files and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
|
81 |
query = st.text_input("Ask a Question from the PDF Files", key="query")
|
82 |
if st.button("Submit & Process", key="process_button"):
|
83 |
with st.spinner("Processing..."):
|