miojizzy commited on
Commit
a8eb6f2
·
1 Parent(s): 18ad196

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -9
app.py CHANGED
@@ -64,15 +64,19 @@ def my_function(x, progress=gr.Progress()):
64
  time.sleep(0.1)
65
  return x
66
 
 
 
67
 
68
- demo = gr.Interface(
69
- my_function,
70
- gr.Textbox(),
71
- gr.Textbox(),
72
- examples = [
73
- ["qwe"],
74
- ["asd"],
75
- ],
76
- )
 
 
77
 
78
  demo.queue().launch()
 
64
  time.sleep(0.1)
65
  return x
66
 
67
+
68
+ with gr.Blocks() as demo:
69
 
70
+ with gr.Row():
71
+ input = gr.Textbox()
72
+ output = gr.Textbox()
73
+ btn = gr.Button(value="Submit")
74
+ btn.click(my_function, inputs=input, outputs=output)
75
+
76
+ #demo = gr.Interface(
77
+ # my_function,
78
+ # gr.Textbox(),
79
+ # gr.Textbox(),
80
+ #)
81
 
82
  demo.queue().launch()