shubhendu-ghosh commited on
Commit
cc17fdc
1 Parent(s): 4fb5338

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -79,19 +79,33 @@ def user_input(user_question):
79
 
80
 
81
 
82
-
83
  def main():
84
  st.set_page_config("Chat PDF")
 
 
 
 
 
 
 
 
 
 
85
  st.header("Chat with PDF using Gemini💁")
86
 
 
87
  user_question = st.text_input("Ask a Question from the PDF Files")
88
 
 
89
  if user_question:
90
  user_input(user_question)
91
 
 
92
  with st.sidebar:
93
  st.title("Menu:")
 
94
  pdf_docs = st.file_uploader("Upload your PDF Files and Click on the Submit & Process Button", accept_multiple_files=True)
 
95
  if st.button("Submit & Process"):
96
  with st.spinner("Processing..."):
97
  raw_text = get_pdf_text(pdf_docs)
@@ -99,7 +113,5 @@ def main():
99
  get_vector_store(text_chunks)
100
  st.success("Done")
101
 
102
-
103
-
104
  if __name__ == "__main__":
105
- main()
 
79
 
80
 
81
 
 
82
  def main():
83
  st.set_page_config("Chat PDF")
84
+ st.markdown(
85
+ """
86
+ <style>
87
+ .reportview-container {
88
+ background: #fff;
89
+ }
90
+ </style>
91
+ """,
92
+ unsafe_allow_html=True,
93
+ )
94
  st.header("Chat with PDF using Gemini💁")
95
 
96
+ # Text input for user question
97
  user_question = st.text_input("Ask a Question from the PDF Files")
98
 
99
+ # If user inputs a question, process it
100
  if user_question:
101
  user_input(user_question)
102
 
103
+ # Sidebar menu
104
  with st.sidebar:
105
  st.title("Menu:")
106
+ # File uploader for PDF files
107
  pdf_docs = st.file_uploader("Upload your PDF Files and Click on the Submit & Process Button", accept_multiple_files=True)
108
+ # Button to submit and process PDF files
109
  if st.button("Submit & Process"):
110
  with st.spinner("Processing..."):
111
  raw_text = get_pdf_text(pdf_docs)
 
113
  get_vector_store(text_chunks)
114
  st.success("Done")
115
 
 
 
116
  if __name__ == "__main__":
117
+ main()