Spaces:
Sleeping
Sleeping
updated
Browse files
app.py
CHANGED
@@ -71,7 +71,7 @@ def display_download_button(file_path, file_name):
|
|
71 |
with open(file_path, "rb") as f:
|
72 |
file_bytes = f.read()
|
73 |
b64 = base64.b64encode(file_bytes).decode()
|
74 |
-
href = f'<a href="data:application/pdf;base64,{b64}" download="{file_name}">Download PDF
|
75 |
st.markdown(href, unsafe_allow_html=True)
|
76 |
except FileNotFoundError:
|
77 |
st.error("File not found for download.")
|
|
|
71 |
with open(file_path, "rb") as f:
|
72 |
file_bytes = f.read()
|
73 |
b64 = base64.b64encode(file_bytes).decode()
|
74 |
+
href = f'<a href="data:application/pdf;base64,{b64}" download="{file_name}">Download the source document in PDF format.</a>'
|
75 |
st.markdown(href, unsafe_allow_html=True)
|
76 |
except FileNotFoundError:
|
77 |
st.error("File not found for download.")
|