GIRI45 commited on
Commit
2ec2ad1
·
verified ·
1 Parent(s): c64a253

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -67,9 +67,9 @@ if st.button("Compare"):
67
  pdf.add_page()
68
  pdf.set_font("Arial", size=12)
69
  pdf.multi_cell(0, 10, txt="Competitive Analysis Report\n\n" + result)
70
- pdf_output = BytesIO()
71
- pdf.output(pdf_output)
72
- pdf_output.seek(0)
73
 
74
  st.download_button(
75
  label="📥 Download PDF Report",
 
67
  pdf.add_page()
68
  pdf.set_font("Arial", size=12)
69
  pdf.multi_cell(0, 10, txt="Competitive Analysis Report\n\n" + result)
70
+ # Generate PDF content as string and convert to BytesIO
71
+ pdf_bytes = pdf.output(dest='S').encode('latin1')
72
+ pdf_output = BytesIO(pdf_bytes)
73
 
74
  st.download_button(
75
  label="📥 Download PDF Report",