prithivMLmods commited on
Commit
1c8929a
·
verified ·
1 Parent(s): 9c961b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -26
app.py CHANGED
@@ -271,22 +271,22 @@ with gr.Blocks(css=custom_css, theme=app_theme) as main_interface:
271
  with gr.Column(scale=1.5):
272
  image_result = gr.AnnotatedImage(label="Segmented Result", height=450)
273
 
274
- gr.Examples(
275
- examples=[
276
- ["examples/player.jpg", "player in white", 0.5],
277
- ],
278
- inputs=[image_input, txt_prompt_img, conf_slider],
279
- outputs=[image_result],
280
- fn=run_image_segmentation,
281
- cache_examples=False,
282
- label="Image Examples"
283
- )
284
-
285
- btn_process_img.click(
286
- fn=run_image_segmentation,
287
- inputs=[image_input, txt_prompt_img, conf_slider],
288
- outputs=[image_result]
289
- )
290
 
291
  with gr.Tab("Video Segmentation"):
292
  with gr.Row():
@@ -304,16 +304,16 @@ with gr.Blocks(css=custom_css, theme=app_theme) as main_interface:
304
  video_result = gr.Video(label="Processed Video")
305
  process_status = gr.Textbox(label="System Status", interactive=False)
306
 
307
- gr.Examples(
308
- examples=[
309
- ["examples/sample_video.mp4", "ball", 60, 60],
310
- ],
311
- inputs=[video_input, txt_prompt_vid, frame_limiter, time_limiter],
312
- outputs=[video_result, process_status],
313
- fn=run_video_segmentation,
314
- cache_examples=False,
315
- label="Video Examples"
316
- )
317
 
318
  btn_process_vid.click(
319
  run_video_segmentation,
 
271
  with gr.Column(scale=1.5):
272
  image_result = gr.AnnotatedImage(label="Segmented Result", height=450)
273
 
274
+ gr.Examples(
275
+ examples=[
276
+ ["examples/player.jpg", "player in white", 0.5],
277
+ ],
278
+ inputs=[image_input, txt_prompt_img, conf_slider],
279
+ outputs=[image_result],
280
+ fn=run_image_segmentation,
281
+ cache_examples=False,
282
+ label="Image Examples"
283
+ )
284
+
285
+ btn_process_img.click(
286
+ fn=run_image_segmentation,
287
+ inputs=[image_input, txt_prompt_img, conf_slider],
288
+ outputs=[image_result]
289
+ )
290
 
291
  with gr.Tab("Video Segmentation"):
292
  with gr.Row():
 
304
  video_result = gr.Video(label="Processed Video")
305
  process_status = gr.Textbox(label="System Status", interactive=False)
306
 
307
+ gr.Examples(
308
+ examples=[
309
+ ["examples/sample_video.mp4", "ball", 60, 60],
310
+ ],
311
+ inputs=[video_input, txt_prompt_vid, frame_limiter, time_limiter],
312
+ outputs=[video_result, process_status],
313
+ fn=run_video_segmentation,
314
+ cache_examples=False,
315
+ label="Video Examples"
316
+ )
317
 
318
  btn_process_vid.click(
319
  run_video_segmentation,