Jiaaaaaaax commited on
Commit
1ef3152
·
verified ·
1 Parent(s): 04c8250

Update save button

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -133,7 +133,10 @@ with gr.Blocks(css=css_styles) as demo:
133
  # Write the HTML content to a temporary HTML file
134
  with open(html_path, 'w') as f:
135
  f.write(html_content)
136
-
 
 
 
137
  def reset():
138
  return "", 0, 0, 0, 0, [], [], 10, "", "", "", gr.update(visible=False), gr.update(visible=False), gr.update(visible=False)
139
 
 
133
  # Write the HTML content to a temporary HTML file
134
  with open(html_path, 'w') as f:
135
  f.write(html_content)
136
+
137
+ # Convert HTML to PDF
138
+ pdfkit.from_file(html_path, pdf_path)
139
+
140
  def reset():
141
  return "", 0, 0, 0, 0, [], [], 10, "", "", "", gr.update(visible=False), gr.update(visible=False), gr.update(visible=False)
142