ChristopherMarais commited on
Commit
e4824f4
·
verified ·
1 Parent(s): fe67663

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -194,12 +194,13 @@ def predict_beetle(img):
194
  # }
195
  # """
196
 
197
- # Sample images directory
198
- sample_images_dir = "example_images"
199
-
200
- # Collect sample image paths (these should be paths to any images you want to use as examples)
201
- example_images = [[os.path.join(sample_images_dir, img)] for img in os.listdir(sample_images_dir) if img.endswith(('.png', '.jpg', '.jpeg'))]
202
-
 
203
 
204
  with gr.Blocks() as demo: # css=css in the brackets
205
  gr.Markdown("<h1><center>Bark Beetle Classification<h1><center>")
 
194
  # }
195
  # """
196
 
197
+ # Sample images with labels
198
+ example_images = [
199
+ [os.path.join("example_images", "example1.jpg"), "Example Beetles 1"],
200
+ [os.path.join("example_images", "example2.jpg"), "Example Beetles 2"],
201
+ [os.path.join("example_images", "example3.jpg"), "Example Beetles 3"],
202
+ [os.path.join("example_images", "mixed.jpg"), "Example Beetles Mixed"],
203
+ ]
204
 
205
  with gr.Blocks() as demo: # css=css in the brackets
206
  gr.Markdown("<h1><center>Bark Beetle Classification<h1><center>")