Spaces:
Runtime error
Runtime error
enabled queue
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ categories = learn.dls.vocab
|
|
21 |
def classify_image(img):
|
22 |
pred,idx,probs = learn.predict(img)
|
23 |
return dict(zip(categories, map(float, probs)))
|
24 |
-
|
25 |
# Cell
|
26 |
|
27 |
title = "Identify This Insect"
|
@@ -42,5 +42,6 @@ image = gr.inputs.Image(shape=(224,224))
|
|
42 |
label = gr.outputs.Label()
|
43 |
examples = ['caterpillar.jpg', 'centipede.jpg', 'millipede.jpg', 'caterpillar-2.jpg']
|
44 |
|
45 |
-
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples, title = title, description = description, article = article
|
|
|
46 |
intf.launch()
|
|
|
21 |
def classify_image(img):
|
22 |
pred,idx,probs = learn.predict(img)
|
23 |
return dict(zip(categories, map(float, probs)))
|
24 |
+
|
25 |
# Cell
|
26 |
|
27 |
title = "Identify This Insect"
|
|
|
42 |
label = gr.outputs.Label()
|
43 |
examples = ['caterpillar.jpg', 'centipede.jpg', 'millipede.jpg', 'caterpillar-2.jpg']
|
44 |
|
45 |
+
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples, title = title, description = description, article = article,
|
46 |
+
enable_queue=True)
|
47 |
intf.launch()
|