Spaces:
Sleeping
Sleeping
refactor
Browse files
app.py
CHANGED
@@ -13,8 +13,9 @@ def classify_image(image):
|
|
13 |
pred, idx, probs = learner.predict(image)
|
14 |
return dict(zip(categories, map(float, probs)))
|
15 |
|
16 |
-
|
|
|
17 |
examples = ['chess.jpg', 'checkers.webp', "dono.jpg"]
|
18 |
|
19 |
-
demo = gr.Interface(fn=classify_image, inputs=
|
20 |
demo.launch()
|
|
|
13 |
pred, idx, probs = learner.predict(image)
|
14 |
return dict(zip(categories, map(float, probs)))
|
15 |
|
16 |
+
image = gr.Image(shape=(192, 192))
|
17 |
+
label = gr.Label()
|
18 |
examples = ['chess.jpg', 'checkers.webp', "dono.jpg"]
|
19 |
|
20 |
+
demo = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
21 |
demo.launch()
|