Test-iframe / app.py
Omnibus's picture
Update app.py
cf7468e
raw
history blame
510 Bytes
import gradio as gr
def first():
out = '''<h1>Loading'''
return out
def test(inp):
out = f'''<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<object data="{inp}"></object>
<iframe
src="{inp}"
frameborder="0"
width="100%"
height="2000"
></iframe>
</body>
</html>'''
return out
with gr.Blocks() as app:
input = gr.Textbox()
btn = gr.Button()
output = gr.HTML("""""")
btn.click(first,None,output).then(test,input,output)
app.launch()