Tan Le commited on
Commit
875c2d7
β€’
1 Parent(s): d532c59

Diversify example images with different classes

Browse files
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
- print(output)
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/beverage_cans_17.jpeg",
56
- "images/construction_scrap_69.jpeg",
57
- "images/metal_containers_19.jpeg",
58
- "images/metal_objects_12.jpeg",
59
- "images/spray_cans_47.jpeg",
 
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