Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -31,21 +31,12 @@ def show_html_in_iframe(page_idx):
|
|
31 |
# Create a slider component to select the HTML page
|
32 |
slider = gr.Slider(minimum=0, maximum=len(html_files)-1, step=1, label='Page')
|
33 |
|
34 |
-
# Create
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
# Create the Gradio interface with a vertical layout
|
41 |
-
iface = gr.Interface(
|
42 |
-
fn=show_html_in_iframe,
|
43 |
-
inputs=components[0],
|
44 |
-
outputs=components[1],
|
45 |
-
title="HTML Viewer with Event Listeners",
|
46 |
-
description="Displays HTML content with JavaScript event listeners via an iframe.",
|
47 |
-
layout="vertical"
|
48 |
-
)
|
49 |
|
50 |
# Display the interface
|
51 |
iface.launch()
|
|
|
31 |
# Create a slider component to select the HTML page
|
32 |
slider = gr.Slider(minimum=0, maximum=len(html_files)-1, step=1, label='Page')
|
33 |
|
34 |
+
# Create the Gradio interface
|
35 |
+
iface = gr.Interface(fn=show_html_in_iframe,
|
36 |
+
inputs=slider,
|
37 |
+
outputs=gr.HTML(),
|
38 |
+
title="HTML Viewer with Event Listeners",
|
39 |
+
description="Displays HTML content with JavaScript event listeners via an iframe.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
# Display the interface
|
42 |
iface.launch()
|