flavienbwk commited on
Commit
afe2b65
·
1 Parent(s): a2f374b
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -1,8 +1,14 @@
1
  import gradio as gr
2
 
3
- # Create a button that shows "Hello" when clicked
4
  def greet(name):
5
  return "Hello " + name + "!"
6
 
7
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
8
- iface.launch()
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
 
3
  def greet(name):
4
  return "Hello " + name + "!"
5
 
6
+
7
+ # Create a button that shows "Hello" when clicked
8
+ gradio.Button("Hello", greet, type="text")
9
+
10
+ # Create a button that shows "Goodbye" when clicked
11
+ gradio.Button("Goodbye", greet, type="text")
12
+
13
+ # start app
14
+ gr.Interface(greet, "world").launch()