dperales commited on
Commit
88181c9
1 Parent(s): ddf1e05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -133,9 +133,15 @@ with demo:
133
  img_output_from_upload= gr.Image(shape=(650,650))
134
 
135
  with gr.Row():
136
- example_images = gr.Dataset(components=[img_input],
137
- samples=[[path.as_posix()]
138
- for path in sorted(pathlib.Path('images').rglob('*.JPG','*.jpg'))])
 
 
 
 
 
 
139
 
140
  img_but = gr.Button('Detect')
141
 
 
133
  img_output_from_upload= gr.Image(shape=(650,650))
134
 
135
  with gr.Row():
136
+ # example_images = gr.Dataset(components=[img_input],
137
+ # samples=[[path.as_posix()]
138
+ # for path in sorted(pathlib.Path('images').rglob('*.JPG'))])
139
+
140
+ # Get a list of image file paths with .JPG and .jpg extensions
141
+ image_paths = sorted(list(pathlib.Path('images').rglob('*.JPG')) + list(pathlib.Path('images').rglob('*.jpg')))
142
+
143
+ # Create the example_images dataset
144
+ example_images = gr.Dataset(components=[img_input], samples=[[path.as_posix()] for path in image_paths])
145
 
146
  img_but = gr.Button('Detect')
147