rairo commited on
Commit
fef9a70
·
verified ·
1 Parent(s): 3a18ff6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -288,20 +288,11 @@ def main():
288
  report = response.text
289
 
290
  try:
291
- pdf = MarkdownPdf()
292
- pdf.meta["title"] = 'Surburb Business Report'
293
- pdf.add_section(Section(Report, toc=False))
294
- pdf.save('report.pdf')
295
- st.download_button(
296
- label="Download Report as PDF",
297
- data=pdf_bytes,
298
- file_name="report.pdf",
299
- mime="application/pdf"
300
- )
301
  st.markdown(report) # Display the report below the download button
302
  except Exception as e:
303
- st.error(f"Error generating PDF: {e}")
304
- st.markdown(report) # Fallback to displaying report in markdown if PDF fails
305
  else:
306
  st.error("No data available for reports.")
307
 
 
288
  report = response.text
289
 
290
  try:
291
+
 
 
 
 
 
 
 
 
 
292
  st.markdown(report) # Display the report below the download button
293
  except Exception as e:
294
+ st.error(f"Error generating report {e}")
295
+ # Fallback to displaying report in markdown if PDF fails
296
  else:
297
  st.error("No data available for reports.")
298