Spaces:
Runtime error
Runtime error
Tan Le
commited on
Commit
β’
875c2d7
1
Parent(s):
d532c59
Diversify example images with different classes
Browse files- app.py +7 -7
- images/beverage_cans_17.jpeg +0 -0
- images/cigarette_butt.jpeg +0 -0
- images/construction_scrap_69.jpeg +0 -0
- images/masks.jpeg +0 -0
- images/metal_containers_19.jpeg +0 -0
- images/{metal_objects_12.jpeg β metal_objects.jpeg} +0 -0
- images/paper.jpeg +0 -0
- images/{spray_cans_47.jpeg β spray_cans.jpeg} +0 -0
- images/syringe.jpeg +0 -0
app.py
CHANGED
@@ -27,8 +27,7 @@ def infer(model, image_tensor):
|
|
27 |
labels = ["cardboard", "glass", "metal", "paper", "plastic", "trash"]
|
28 |
predictions = list(map(float, predictions[0]))
|
29 |
output = dict(zip(labels, predictions))
|
30 |
-
|
31 |
-
|
32 |
return output
|
33 |
|
34 |
|
@@ -52,11 +51,12 @@ description = "Upload an image or select from examples to classify trash."
|
|
52 |
article = "<div style='text-align: center;'>Space by Tan Le</div>"
|
53 |
|
54 |
examples = [
|
55 |
-
"images/
|
56 |
-
"images/
|
57 |
-
"images/
|
58 |
-
"images/
|
59 |
-
"images/
|
|
|
60 |
]
|
61 |
|
62 |
demo = gr.Interface(
|
|
|
27 |
labels = ["cardboard", "glass", "metal", "paper", "plastic", "trash"]
|
28 |
predictions = list(map(float, predictions[0]))
|
29 |
output = dict(zip(labels, predictions))
|
30 |
+
|
|
|
31 |
return output
|
32 |
|
33 |
|
|
|
51 |
article = "<div style='text-align: center;'>Space by Tan Le</div>"
|
52 |
|
53 |
examples = [
|
54 |
+
"images/cigarette_butt.jpeg",
|
55 |
+
"images/masks.jpeg",
|
56 |
+
"images/metal_objects.jpeg",
|
57 |
+
"images/paper.jpeg",
|
58 |
+
"images/spray_cans.jpeg",
|
59 |
+
"images/syringe.jpeg",
|
60 |
]
|
61 |
|
62 |
demo = gr.Interface(
|
images/beverage_cans_17.jpeg
DELETED
Binary file (29.1 kB)
|
|
images/cigarette_butt.jpeg
ADDED
images/construction_scrap_69.jpeg
DELETED
Binary file (28.7 kB)
|
|
images/masks.jpeg
ADDED
images/metal_containers_19.jpeg
DELETED
Binary file (111 kB)
|
|
images/{metal_objects_12.jpeg β metal_objects.jpeg}
RENAMED
File without changes
|
images/paper.jpeg
ADDED
images/{spray_cans_47.jpeg β spray_cans.jpeg}
RENAMED
File without changes
|
images/syringe.jpeg
ADDED