Spaces:
Runtime error
Runtime error
Commit
•
9b63141
1
Parent(s):
d095b3d
Update app.py
Browse files
app.py
CHANGED
@@ -9,10 +9,16 @@ def download_html(content):
|
|
9 |
return "content.html"
|
10 |
|
11 |
html_component = gr.HTML(generate_html)
|
12 |
-
download_button = gr.DownloadButton(label="Download HTML", inputs=html_component, value=download_html)
|
|
|
13 |
|
14 |
interface = gr.Interface(fn=generate_html,
|
15 |
inputs=None,
|
16 |
outputs=[html_component, download_button])
|
17 |
|
|
|
|
|
|
|
|
|
|
|
18 |
interface.launch()
|
|
|
9 |
return "content.html"
|
10 |
|
11 |
html_component = gr.HTML(generate_html)
|
12 |
+
# download_button = gr.DownloadButton(label="Download HTML", inputs=html_component, value=download_html)
|
13 |
+
download_button = gr.DownloadButton(label="Download HTML")
|
14 |
|
15 |
interface = gr.Interface(fn=generate_html,
|
16 |
inputs=None,
|
17 |
outputs=[html_component, download_button])
|
18 |
|
19 |
+
download_button.click(
|
20 |
+
fn=download_html,
|
21 |
+
inputs=html_component,
|
22 |
+
)
|
23 |
+
|
24 |
interface.launch()
|