Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,15 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|