Samarth991 commited on
Commit
13b91f3
·
verified ·
1 Parent(s): 4b90422

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -24,11 +24,7 @@ def main():
24
  )
25
 
26
  uploaded_file = st.sidebar.file_uploader("Choose a PDF file", type="pdf")
27
- save_folder = 'docs/'
28
- save_path = Path(save_folder, uploaded_file.name)
29
- print(save_path)
30
- with open(save_path, mode='wb') as w:
31
- w.write(uploaded_file.getvalue())
32
 
33
  api_input = st.sidebar.text_input(
34
  "Enter The API KEY 👇",
@@ -38,6 +34,12 @@ def main():
38
  )
39
 
40
  if uploaded_file is not None:
 
 
 
 
 
 
41
  st.sidebar.success("File uploaded successfully.")
42
  print(save_path)
43
  vector_store = PDF_4_QA(save_path)
 
24
  )
25
 
26
  uploaded_file = st.sidebar.file_uploader("Choose a PDF file", type="pdf")
27
+
 
 
 
 
28
 
29
  api_input = st.sidebar.text_input(
30
  "Enter The API KEY 👇",
 
34
  )
35
 
36
  if uploaded_file is not None:
37
+ save_folder = 'docs/'
38
+ save_path = Path(save_folder, uploaded_file.name)
39
+ print(save_path)
40
+ with open(save_path, mode='wb') as w:
41
+ w.write(uploaded_file.getvalue())
42
+
43
  st.sidebar.success("File uploaded successfully.")
44
  print(save_path)
45
  vector_store = PDF_4_QA(save_path)