Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -37,11 +37,13 @@ def create_pdf(documentation):
|
|
37 |
pdf.add_page()
|
38 |
pdf.set_font("Arial", size=12)
|
39 |
pdf.multi_cell(200, 10, documentation)
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
|
42 |
-
pdf.output(file_name)
|
43 |
-
|
44 |
-
return file_name
|
45 |
|
46 |
# Gradio interface
|
47 |
def process_code(code_input):
|
|
|
37 |
pdf.add_page()
|
38 |
pdf.set_font("Arial", size=12)
|
39 |
pdf.multi_cell(200, 10, documentation)
|
40 |
+
|
41 |
+
# Create a bytes buffer and output the PDF to it
|
42 |
+
buffer = io.BytesIO()
|
43 |
+
pdf.output(buffer)
|
44 |
+
buffer.seek(0)
|
45 |
|
46 |
+
return buffer
|
|
|
|
|
|
|
47 |
|
48 |
# Gradio interface
|
49 |
def process_code(code_input):
|