Samarth991 commited on
Commit
8da73e9
·
verified ·
1 Parent(s): 9f7cc06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -12
app.py CHANGED
@@ -13,13 +13,13 @@ def main():
13
  )
14
 
15
  st.sidebar.title("Upload PDF")
16
- # st.sidebar.write("Download Demo PDF file from Below....")
17
- # with open("Kia_EV6.pdf", "rb") as file:
18
- # btn = st.sidebar.download_button(
19
- # label="Download PDF",
20
- # data=file,
21
- # file_name="Kia_EV6.pdf"
22
- # )
23
 
24
  uploaded_file = st.sidebar.file_uploader("Choose a PDF file", type="pdf")
25
 
@@ -30,11 +30,14 @@ def main():
30
  type="password"
31
  )
32
 
33
- if uploaded_file is not None:
34
- st.sidebar.success("File uploaded successfully.")
35
- print(uploaded_file)
36
- vector_store = PDF_4_QA(uploaded_file)
37
- QA_Bot(vector_store,api_input)
 
 
 
38
 
39
  if __name__ == '__main__':
40
  main()
 
13
  )
14
 
15
  st.sidebar.title("Upload PDF")
16
+ st.sidebar.write("Download Demo PDF file from Below....")
17
+ with open("docs/SamarthTandon_cv_2.pdf", "rb") as file:
18
+ btn = st.sidebar.download_button(
19
+ label="Download PDF",
20
+ data=file,
21
+ file_name="SamarthTandon_cv_2.pdf"
22
+ )
23
 
24
  uploaded_file = st.sidebar.file_uploader("Choose a PDF file", type="pdf")
25
 
 
30
  type="password"
31
  )
32
 
33
+ # if uploaded_file is not None:
34
+ # st.sidebar.success("File uploaded successfully.")
35
+ # print(uploaded_file)
36
+ # vector_store = PDF_4_QA(uploaded_file)
37
+ # QA_Bot(vector_store,api_input)
38
+ # else:
39
+ vector_store = PDF_4_QA("docs/SamarthTandon_cv_2.pdf")
40
+ QA_Bot(vector_store,api_input)
41
 
42
  if __name__ == '__main__':
43
  main()