wushuang98's picture
Update app.py
dbecd1e verified
raw
history blame
421 Bytes
import gradio as gr
def update_iframe(url):
return f'<iframe src="{url}" width="100%" height="500"></iframe>'
with gr.Blocks() as demo:
with gr.Row():
url_input = gr.Textbox(label="输入URL", value="http://animeit.cn/")
submit_btn = gr.Button("加载")
iframe = gr.HTML()
submit_btn.click(
fn=update_iframe,
inputs=url_input,
outputs=iframe
)
demo.launch()