Spaces:
Build error
Build error
Update app.py
Browse files
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 |
-
|
| 71 |
-
pdf.output(
|
| 72 |
-
pdf_output
|
| 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",
|