zeyadahmedd commited on
Commit
ca150b2
1 Parent(s): 1491312

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -6,9 +6,17 @@ def greet(name):
6
  def greet1(name):
7
  return "Hello ya client" +name
8
 
9
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
10
 
11
- iten=gr.Interface(fn=greet1, inputs="text", outputs="text",api_name="/testing")
 
 
 
 
 
 
 
 
 
 
12
 
13
- app=gr.Interface(interfaces=[iface, iten])
14
- app.launch()
 
6
  def greet1(name):
7
  return "Hello ya client" +name
8
 
9
+ iface = gr.Blocks()
10
 
11
+ with iface:
12
+ name = gr.Textbox(label="Name")
13
+ output = gr.Textbox(label="Output Box")
14
+
15
+ greet_btn = gr.Button("Greet")
16
+ greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
17
+
18
+ greet1_btn = gr.Button("Greet1")
19
+ greet1_btn.click(fn=greet1, inputs=name, outputs=output, api_name="/testing")
20
+
21
+ iface.launch()
22