Chandranshu Jain
commited on
Commit
•
f7dd29a
1
Parent(s):
def6987
Update app.py
Browse files
app.py
CHANGED
@@ -98,13 +98,13 @@ with st.sidebar:
|
|
98 |
st.title("PDF FILE UPLOAD:")
|
99 |
pdf_docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
|
100 |
|
101 |
-
query = st.
|
102 |
if st.button("Submit & Process", key="process_button"):
|
103 |
#with st.spinner("Processing..."):
|
104 |
raw_text = get_pdf(pdf_docs)
|
105 |
text_chunks = text_splitter(raw_text)
|
106 |
if query:
|
107 |
-
st.session_state.messages.append({'role': 'user', "content": query})
|
108 |
response = embedding(text_chunks,query)
|
109 |
st.session_state.messages.append({'role': 'assistant', "content": response})
|
110 |
|
|
|
98 |
st.title("PDF FILE UPLOAD:")
|
99 |
pdf_docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
|
100 |
|
101 |
+
query = st.chat_input("Ask a Question from the PDF File")
|
102 |
if st.button("Submit & Process", key="process_button"):
|
103 |
#with st.spinner("Processing..."):
|
104 |
raw_text = get_pdf(pdf_docs)
|
105 |
text_chunks = text_splitter(raw_text)
|
106 |
if query:
|
107 |
+
#st.session_state.messages.append({'role': 'user', "content": query})
|
108 |
response = embedding(text_chunks,query)
|
109 |
st.session_state.messages.append({'role': 'assistant', "content": response})
|
110 |
|