com3dian commited on
Commit
461e9ba
·
verified ·
1 Parent(s): 14a70ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -186,18 +186,18 @@ def html_to_pdf(html_content):
186
 
187
  html_content = create_pdf_from_markdown_strings(st.session_state.summ_text)
188
 
189
- if st.button("Download PDF"):
190
- if html_content:
191
- pdf_path = html_to_pdf(html_content)
192
-
193
- with open(pdf_path, "rb") as pdf_file:
194
- st.download_button(
195
- label="Download PDF",
196
- data=pdf_file,
197
- file_name="converted.pdf",
198
- mime="application/pdf"
199
- )
200
-
201
- # Remove the temporary file
202
- os.remove(pdf_path)
203
 
 
186
 
187
  html_content = create_pdf_from_markdown_strings(st.session_state.summ_text)
188
 
189
+
190
+ if html_content:
191
+ pdf_path = html_to_pdf(html_content)
192
+
193
+ with open(pdf_path, "rb") as pdf_file:
194
+ st.download_button(
195
+ label="Download PDF",
196
+ data=pdf_file,
197
+ file_name="converted.pdf",
198
+ mime="application/pdf"
199
+ )
200
+
201
+ # Remove the temporary file
202
+ os.remove(pdf_path)
203