yasserrmd commited on
Commit
34e4bd2
1 Parent(s): 3ca495f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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
- file_name = "/mnt/data/Generated_Documentation.pdf"
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):