File size: 510 Bytes
a728a0a
 
 
5d06996
 
 
 
a728a0a
a137c8a
a728a0a
 
 
 
cf7468e
 
a728a0a
5d06996
a728a0a
 
 
e9a0290
a728a0a
a137c8a
a728a0a
 
 
 
 
7c4cb65
a728a0a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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()