VanShingel commited on
Commit
fa53bb9
1 Parent(s): a46df70

examples added

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -87,9 +87,13 @@ def main_pipeline(image):
87
  # initializing the input component
88
  image = gr.inputs.Image()
89
 
 
 
 
90
 
91
  # launching the interface
92
  gr.Interface(fn = main_pipeline, title= 'Age & Gender predictions', inputs = image,
93
  outputs = [gr.Image(label= 'Result', shape= (250,250)),
94
  gr.Text(label= 'Age'),
95
- gr.Text(label= 'Gender')], flagging_options=["correct", "incorrect", "other"], capture_session = True).launch()
 
 
87
  # initializing the input component
88
  image = gr.inputs.Image()
89
 
90
+ # initializzing examples
91
+ test_imgs = [os.path.join(config['TEST_IMG_PATH'],img) for img in os.listdir(config['TEST_IMG_PATH'])]
92
+ examples = test_imgs
93
 
94
  # launching the interface
95
  gr.Interface(fn = main_pipeline, title= 'Age & Gender predictions', inputs = image,
96
  outputs = [gr.Image(label= 'Result', shape= (250,250)),
97
  gr.Text(label= 'Age'),
98
+ gr.Text(label= 'Gender')], flagging_options=["correct", "incorrect", "other"],
99
+ examples= examples, capture_session = True).launch()