Stuti commited on
Commit
a905593
·
1 Parent(s): 60c2c93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -84,7 +84,7 @@ Links to HuggingFace Models:
84
  """
85
 
86
  models = ["facebook/detr-resnet-50","facebook/detr-resnet-101"]
87
-
88
  css = '''
89
  h1#title {
90
  text-align: center;
@@ -107,13 +107,13 @@ with demo:
107
  with gr.Row():
108
  example_images = gr.Dataset(components=[img_input],
109
  samples=[[path.as_posix()]
110
- for path in sorted(pathlib.Path('images').rglob('*.JPG'))])
111
 
112
  img_but = gr.Button('Detect')
113
 
114
 
115
- img_but.click(detect_objects,inputs=[options,img_input,slider_input],outputs=img_output_from_upload,queue=True)
116
- example_images.click(fn=set_example_image,inputs=[example_images],outputs=[img_input])
117
 
118
 
119
  #gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=nickmuchi-object-detection-with-detr-and-yolos)")
 
84
  """
85
 
86
  models = ["facebook/detr-resnet-50","facebook/detr-resnet-101"]
87
+ examples = ['1daaadc1e83fcecc7bfa920ed2773653.jpeg']
88
  css = '''
89
  h1#title {
90
  text-align: center;
 
107
  with gr.Row():
108
  example_images = gr.Dataset(components=[img_input],
109
  samples=[[path.as_posix()]
110
+ for path in sorted(pathlib.Path('images').rglob('*.jpeg'))])
111
 
112
  img_but = gr.Button('Detect')
113
 
114
 
115
+ img_but.click(detect_objects,inputs=[options,img_input,slider_input],outputs=img_output_from_upload,queue=True, examples=examples)
116
+ example_images.click(fn=set_example_image,inputs=[example_images],outputs=[img_input], examples=examples)
117
 
118
 
119
  #gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=nickmuchi-object-detection-with-detr-and-yolos)")