Thiwanka01 commited on
Commit
e7a9287
·
verified ·
1 Parent(s): 304bf5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -12
app.py CHANGED
@@ -1,12 +1,15 @@
1
- import gradio as gr
2
-
3
- def interface(name, intensity):
4
-
5
- # Create Interface Gradio
6
- demo = gr.Interface(
7
- fn = interface,
8
- inputs = ["text", "slider"],
9
- outputs = ["text"],
10
- )
11
-
12
- demo.launch()
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # my_function() = interface
4
+ def interface(name, intensity):
5
+ return "Hello, " + name + "!" * int(intensity)
6
+
7
+ # Create Interface Gradio
8
+ demo = gr.Interface(
9
+ fn = interface,
10
+ inputs = ["text", "slider"],
11
+ outputs = ["text"],
12
+ )
13
+
14
+ # Launch the interface
15
+ demo.launch(share = True) # Share your demo with just 1 extra parameter