Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -59,10 +59,18 @@ def classify_image(img):
|
|
59 |
pred, idx, probs = learn.predict(img)
|
60 |
return dict(zip(categories, map(float, probs)))
|
61 |
|
62 |
-
image = gr.Image(shape=(512, 512))
|
63 |
-
label = gr.Label()
|
64 |
-
examples = ['dress.jpg', 'shirt.jpg', 'pants.jpg', 'shorts.jpg']
|
65 |
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
|
|
59 |
pred, idx, probs = learn.predict(img)
|
60 |
return dict(zip(categories, map(float, probs)))
|
61 |
|
|
|
|
|
|
|
62 |
|
63 |
+
iface = gr.Interface(
|
64 |
+
fn=classify_image,
|
65 |
+
inputs=gr.Image(),
|
66 |
+
outputs=gr.Textbox(),
|
67 |
+
# live=True,
|
68 |
+
)
|
69 |
+
iface.launch(share=True)
|
70 |
+
# image = gr.Image(shape=(512, 512))
|
71 |
+
# label = gr.Label()
|
72 |
+
# examples = ['dress.jpg', 'shirt.jpg', 'pants.jpg', 'shorts.jpg']
|
73 |
+
|
74 |
+
# intf = gr.Interface(fn=classify_image, title=title, inputs=image, outputs=label, examples=examples)
|
75 |
+
# intf.launch(inline=False)
|
76 |
|