Chandranshu Jain commited on
Commit
0e12785
1 Parent(s): 84f1446

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -97,6 +97,8 @@ def main():
97
  st.title("Menu:")
98
  pdf_docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
99
  query = st.text_input("Ask a Question from the PDF File", key="query")
 
 
100
  if st.button("Submit & Process", key="process_button"):
101
  with st.spinner("Processing..."):
102
  raw_text = get_pdf(pdf_docs)
 
97
  st.title("Menu:")
98
  pdf_docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
99
  query = st.text_input("Ask a Question from the PDF File", key="query")
100
+ if 'messages' not in st.session_state:
101
+ st.session_state.messages = [{'role': 'assistant', "content": 'Hello! Upload a PDF and ask me anything about its content.'}]
102
  if st.button("Submit & Process", key="process_button"):
103
  with st.spinner("Processing..."):
104
  raw_text = get_pdf(pdf_docs)