MichaelMM2000 commited on
Commit
69e4902
·
1 Parent(s): befdef1
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -27,21 +27,23 @@ def classify_animal(image):
27
 
28
  # Optional: you can add example images
29
  example_images = [
30
- ["example_images/cat.jpeg"],
31
- ["example_images/chicken1.jpeg"],
32
- ["example_images/chicken2.jpeg"],
33
- ["example_images/elefant.jpg"],
34
- ["example_images/spider.jpeg"],
35
- ["example_images/butterfly.jpg"]
36
  ]
37
 
 
38
  iface = gr.Interface(
39
  fn=classify_animal,
40
  inputs=gr.Image(type="filepath"),
41
  outputs=gr.JSON(),
42
  title="Animals-10 Classification: ViT vs CLIP",
43
  description="Upload an animal image to compare predictions from your trained ViT model and a zero-shot CLIP model.",
44
- examples=example_images
45
  )
46
 
 
47
  iface.launch()
 
27
 
28
  # Optional: you can add example images
29
  example_images = [
30
+ "example_images/cat.jpeg",
31
+ "example_images/chicken1.jpeg",
32
+ "example_images/chicken2.jpeg",
33
+ "example_images/elefant.jpg",
34
+ "example_images/spider.jpeg",
35
+ "example_images/butterfly.jpg"
36
  ]
37
 
38
+
39
  iface = gr.Interface(
40
  fn=classify_animal,
41
  inputs=gr.Image(type="filepath"),
42
  outputs=gr.JSON(),
43
  title="Animals-10 Classification: ViT vs CLIP",
44
  description="Upload an animal image to compare predictions from your trained ViT model and a zero-shot CLIP model.",
45
+ examples=example_images # <- jetzt korrekt
46
  )
47
 
48
+
49
  iface.launch()