Spaces:
Runtime error

jesoteric commited on
Commit
1abdfef
·
1 Parent(s): fce23cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -1
app.py CHANGED
@@ -333,4 +333,27 @@ if __name__ == "__main__":
333
  run_button.click(fn=run_grounded_sam, inputs=[
334
  input_image, text_prompt, task_type, inpaint_prompt, box_threshold, text_threshold, iou_threshold, inpaint_mode], outputs=gallery)
335
 
336
- block.launch(debug=args.debug, share=args.share, show_error=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  run_button.click(fn=run_grounded_sam, inputs=[
334
  input_image, text_prompt, task_type, inpaint_prompt, box_threshold, text_threshold, iou_threshold, inpaint_mode], outputs=gallery)
335
 
336
+ iface = gr.Interface(
337
+ run_grounded_sam,
338
+ inputs=[
339
+ input_image,
340
+ text_prompt,
341
+ task_type,
342
+ inpaint_prompt,
343
+ box_threshold,
344
+ text_threshold,
345
+ iou_threshold,
346
+ inpaint_mode
347
+ ],
348
+ outputs=gallery,
349
+ title="Grounded SAM demo",
350
+ description="This is an interactive demo for the Grounded SAM.",
351
+ layout="vertical",
352
+ theme="light",
353
+ live=True
354
+ )
355
+
356
+ if args.no_gradio_queue:
357
+ iface.launch(debug=args.debug, share=args.share, show_error=True)
358
+ else:
359
+ block.launch(debug=args.debug, share=args.share, show_error=True)