lovodkin93 commited on
Commit
c09fda7
·
verified ·
1 Parent(s): ab1c482

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -2,7 +2,8 @@ import gradio as gr
2
  import os
3
 
4
  # Function to show HTML content using an iframe
5
- def show_html_in_iframe(page_idx, html_files, curr_split):
 
6
  # Construct the URL using the selected index
7
  url = f'https://wmtis.s3.eu-west-1.amazonaws.com/{curr_split}/{html_files[page_idx]}'
8
  iframe_html = f'<iframe src="{url}" width="100%" height="1000"></iframe>'
@@ -33,7 +34,7 @@ with gr.Blocks() as demo:
33
 
34
 
35
  # Create the Gradio interface
36
- slider.release(show_html_in_iframe, inputs=[slider, html_files, instance_type_dropdown], outputs=[gr.HTML()], api_name="HTML Viewer with Event Listeners")
37
 
38
  # Display the interface
39
  demo.launch()
 
2
  import os
3
 
4
  # Function to show HTML content using an iframe
5
+ def show_html_in_iframe(page_idx, curr_split):
6
+ html_files = get_html_files_list(curr_split)
7
  # Construct the URL using the selected index
8
  url = f'https://wmtis.s3.eu-west-1.amazonaws.com/{curr_split}/{html_files[page_idx]}'
9
  iframe_html = f'<iframe src="{url}" width="100%" height="1000"></iframe>'
 
34
 
35
 
36
  # Create the Gradio interface
37
+ slider.release(show_html_in_iframe, inputs=[slider, instance_type_dropdown], outputs=[gr.HTML()], api_name="HTML Viewer with Event Listeners")
38
 
39
  # Display the interface
40
  demo.launch()