feat: try input components
Browse files- .gitignore +1 -0
- app.py +8 -3
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.idea
|
app.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def greet(name):
|
| 4 |
-
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
def greet(image):
|
| 5 |
+
return "Hello " + image + "!"
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
inputs = gr.inputs.Image(shape=(192, 192))
|
| 9 |
+
outputs = gr.outputs.Label(num_top_classes=3)
|
| 10 |
+
|
| 11 |
+
iface = gr.Interface(fn=greet, inputs=inputs, outputs=outputs)
|
| 12 |
iface.launch()
|