wushuang98 commited on
Commit
19cb192
·
verified ·
1 Parent(s): dbecd1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -13
app.py CHANGED
@@ -1,18 +1,14 @@
1
  import gradio as gr
2
 
3
- def update_iframe(url):
4
- return f'<iframe src="{url}" width="100%" height="500"></iframe>'
5
-
6
  with gr.Blocks() as demo:
7
- with gr.Row():
8
- url_input = gr.Textbox(label="输入URL", value="http://animeit.cn/")
9
- submit_btn = gr.Button("加载")
10
- iframe = gr.HTML()
11
-
12
- submit_btn.click(
13
- fn=update_iframe,
14
- inputs=url_input,
15
- outputs=iframe
16
- )
17
 
18
  demo.launch()
 
1
  import gradio as gr
2
 
 
 
 
3
  with gr.Blocks() as demo:
4
+ gr.HTML("""
5
+ <iframe
6
+ src="http://animeit.cn/"
7
+ width="100%"
8
+ height="500"
9
+ frameborder="0"
10
+ allow="fullscreen"
11
+ ></iframe>
12
+ """)
 
13
 
14
  demo.launch()