Omnibus commited on
Commit
5d06996
1 Parent(s): a137c8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -1,6 +1,10 @@
1
  import gradio as gr
2
 
3
 
 
 
 
 
4
  def test(inp):
5
  out = f'''<!DOCTYPE html>
6
  <html lang="en">
@@ -8,7 +12,7 @@ def test(inp):
8
  </head>
9
  <body>
10
  <iframe
11
- src="{inp}
12
  frameborder="0"
13
  width="100%"
14
  height="2000"
@@ -20,5 +24,5 @@ with gr.Blocks() as app:
20
  input = gr.Textbox()
21
  btn = gr.Button()
22
  output = gr.HTML("""""")
23
- btn.click(test,input,output)
24
  app.launch()
 
1
  import gradio as gr
2
 
3
 
4
+ def first():
5
+ out = '''<h1>Loading'''
6
+ return out
7
+
8
  def test(inp):
9
  out = f'''<!DOCTYPE html>
10
  <html lang="en">
 
12
  </head>
13
  <body>
14
  <iframe
15
+ src="{inp}"
16
  frameborder="0"
17
  width="100%"
18
  height="2000"
 
24
  input = gr.Textbox()
25
  btn = gr.Button()
26
  output = gr.HTML("""""")
27
+ btn.click(first,None,None).then(test,input,output)
28
  app.launch()