Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,13 +13,13 @@ def main():
|
|
| 13 |
)
|
| 14 |
|
| 15 |
st.sidebar.title("Upload PDF")
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 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 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
| 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()
|