Spaces:
Sleeping
Sleeping
mwrites
commited on
Commit
·
f2d618a
1
Parent(s):
3afcd30
cosmetics
Browse files
app.py
CHANGED
@@ -11,10 +11,17 @@ def classify_image(img):
|
|
11 |
return dict(zip(categories, map(float, prob)))
|
12 |
|
13 |
|
14 |
-
image = gr.components.Image(
|
15 |
label = gr.components.Label()
|
|
|
|
|
|
|
|
|
|
|
16 |
examples = ['multilabel_bird_on_horse.jpg']
|
|
|
17 |
|
18 |
|
19 |
-
iface = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
|
|
20 |
iface.launch(inline=False)
|
|
|
11 |
return dict(zip(categories, map(float, prob)))
|
12 |
|
13 |
|
14 |
+
image = gr.components.Image(height=512, width=512)
|
15 |
label = gr.components.Label()
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
title = "Pascal Multi Label Classifier"
|
20 |
+
description = "A multi label classifier trained on Pascal dataset."
|
21 |
examples = ['multilabel_bird_on_horse.jpg']
|
22 |
+
enable_queue=True
|
23 |
|
24 |
|
25 |
+
iface = gr.Interface(fn=classify_image, inputs=image, outputs=label, title=title,description=description,examples=examples)
|
26 |
+
iface.queue(max_size=3)
|
27 |
iface.launch(inline=False)
|