Viet
commited on
Commit
·
2f48892
1
Parent(s):
daa6547
change app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import gradio as gr
|
2 |
|
3 |
# def greet(name):
|
4 |
# return "Hello " + name + "!!"
|
@@ -25,7 +25,11 @@ image = gr.inputs.Image(shape=(192,192))
|
|
25 |
label = gr.outputs.label()
|
26 |
examples = ['cat.jpg']
|
27 |
|
28 |
-
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
|
|
|
|
|
|
|
|
29 |
intf.launch(inline=False)
|
30 |
|
31 |
|
|
|
1 |
+
#import gradio as gr
|
2 |
|
3 |
# def greet(name):
|
4 |
# return "Hello " + name + "!!"
|
|
|
25 |
label = gr.outputs.label()
|
26 |
examples = ['cat.jpg']
|
27 |
|
28 |
+
#intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
29 |
+
intf = gr.Interface(fn=classify_image,
|
30 |
+
inputs=gr.Image(type="pil"),
|
31 |
+
outputs=gr.Label(num_top_classes=3),
|
32 |
+
examples=["cat.jpg"])
|
33 |
intf.launch(inline=False)
|
34 |
|
35 |
|