lovodkin93 commited on
Commit
229f456
·
verified ·
1 Parent(s): b1de635

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -15
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 a container for the slider and the HTML output
35
- components = [
36
- gr.Column([slider]),
37
- gr.HTML()
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()