andy-wyx commited on
Commit
7a6fc53
·
1 Parent(s): 5852c4b

update fossil examples with correct predicted IDs

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -217,10 +217,10 @@ def explain_image(input_image,model_name,explain_method,nb_samples):
217
 
218
  def setup_examples():
219
  paths = sorted(pathlib.Path('images/').rglob('*.jpg'))
220
- samples = [path.as_posix() for path in paths if 'fossils' in str(path)][:19]
221
  examples_fossils = gr.Examples(samples, inputs=input_image,examples_per_page=5,label='Fossils Examples from the dataset')
222
  samples=[[path.as_posix()] for path in paths if 'leaves' in str(path) ][:19]
223
- examples_leaves = gr.Examples(samples, inputs=input_image,examples_per_page=5,label='Leaves Examples from the dataset')
224
  return examples_fossils,examples_leaves
225
 
226
  def preprocess_image(image, output_size=(300, 300)):
 
217
 
218
  def setup_examples():
219
  paths = sorted(pathlib.Path('images/').rglob('*.jpg'))
220
+ samples = [path.as_posix() for path in paths if 'selected fossil examples' in str(path)][:12]
221
  examples_fossils = gr.Examples(samples, inputs=input_image,examples_per_page=5,label='Fossils Examples from the dataset')
222
  samples=[[path.as_posix()] for path in paths if 'leaves' in str(path) ][:19]
223
+ examples_leaves = gr.Examples(samples, inputs=input_image,examples_per_page=12,label='Leaves Examples from the dataset')
224
  return examples_fossils,examples_leaves
225
 
226
  def preprocess_image(image, output_size=(300, 300)):