Gabolozano commited on
Commit
ed4ede9
1 Parent(s): b6fa5d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -54,13 +54,15 @@ def get_pipeline_prediction(pil_image):
54
  # Setting up Gradio interface with tabs for the outputs
55
  demo = gr.Interface(
56
  fn=get_pipeline_prediction,
57
- inputs=gr.inputs.Image(label="Input image", type="pil"),
58
  outputs=[
59
- gr.outputs.Image(type="pil", label="Annotated Image"),
60
- gr.outputs.JSON(label="Detected Objects")
61
  ],
62
- outputs_per_tab =[['image'], ['json']],
63
- tabs=["Annotated Image", "Detection Results"]
 
 
64
  )
65
 
66
  demo.launch()
 
54
  # Setting up Gradio interface with tabs for the outputs
55
  demo = gr.Interface(
56
  fn=get_pipeline_prediction,
57
+ inputs=gr.Image(label="Input image", type="pil"),
58
  outputs=[
59
+ gr.Image(label="Annotated Image", type="pil"),
60
+ gr.JSON(label="Detected Objects")
61
  ],
62
+ examples=[
63
+ ["sample1.jpg"], ["sample2.jpg"] # Update the example paths as needed
64
+ ],
65
+ title="Object Detection Interface"
66
  )
67
 
68
  demo.launch()