Spaces:
Runtime error
Runtime error
Laks Srini
commited on
Commit
·
6d7a35a
1
Parent(s):
beb11ab
Fix examples
Browse files
app.py
CHANGED
@@ -26,9 +26,15 @@ def classify_img(img, use_conv):
|
|
26 |
|
27 |
|
28 |
# %% app.ipynb 7
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
intf = gr.Interface(
|
34 |
fn=classify_img,
|
@@ -36,7 +42,9 @@ intf = gr.Interface(
|
|
36 |
gr.components.Image(type="pil", shape=(640, 480)),
|
37 |
gr.components.Checkbox(label="Use conv model", value=False),
|
38 |
],
|
39 |
-
outputs=
|
|
|
|
|
40 |
examples=examples
|
41 |
)
|
42 |
intf.launch(inline=False)
|
|
|
26 |
|
27 |
|
28 |
# %% app.ipynb 7
|
29 |
+
|
30 |
+
examples = [
|
31 |
+
["kitchen.jpg", False],
|
32 |
+
["living_room.jpg", False],
|
33 |
+
["living_room2.jpg", False],
|
34 |
+
["kitchen.jpg", True],
|
35 |
+
["living_room.jpg", True],
|
36 |
+
["living_room2.jpg", True]
|
37 |
+
]
|
38 |
|
39 |
intf = gr.Interface(
|
40 |
fn=classify_img,
|
|
|
42 |
gr.components.Image(type="pil", shape=(640, 480)),
|
43 |
gr.components.Checkbox(label="Use conv model", value=False),
|
44 |
],
|
45 |
+
outputs=[
|
46 |
+
gr.components.Label()
|
47 |
+
],
|
48 |
examples=examples
|
49 |
)
|
50 |
intf.launch(inline=False)
|