Spaces:
Runtime error
Runtime error
Update pag/Model_Report.py
Browse files- pag/Model_Report.py +15 -0
pag/Model_Report.py
CHANGED
|
@@ -8,5 +8,20 @@ def display_pdf(filename='MS4.pdf'):
|
|
| 8 |
pdf_viewer(input=pdf, width=700)
|
| 9 |
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
if __name__ == "__main__":
|
| 12 |
display_pdf()
|
|
|
|
| 8 |
pdf_viewer(input=pdf, width=700)
|
| 9 |
|
| 10 |
|
| 11 |
+
def download_pdf_button(filename='MS4.pdf'):
|
| 12 |
+
with open(filename, "rb") as file:
|
| 13 |
+
file.seek(0)
|
| 14 |
+
pdf = file.read()
|
| 15 |
+
st.download_button(
|
| 16 |
+
label="Download PDF",
|
| 17 |
+
data=pdf,
|
| 18 |
+
file_name=filename,
|
| 19 |
+
mime="application/pdf",
|
| 20 |
+
type="primary",
|
| 21 |
+
use_container_width=True,
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
if __name__ == "__main__":
|
| 27 |
display_pdf()
|