AmirKaseb commited on
Commit
94ae2bb
·
verified ·
1 Parent(s): 0af3802

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -22,11 +22,11 @@ def yolo_inference(image):
22
  return result_image, {labels[int(box.cls)]: float(box.conf) for box in boxes}
23
 
24
 
25
- # Set up Gradio interface
26
- inputs = gr.inputs.Image(type="pil", label="Upload an Image")
27
  outputs = [
28
- gr.outputs.Image(type="pil", label="Detection Output"),
29
- gr.outputs.JSON(label="Detection Results"),
30
  ]
31
 
32
  gr.Interface(
 
22
  return result_image, {labels[int(box.cls)]: float(box.conf) for box in boxes}
23
 
24
 
25
+ # Set up Gradio interface using the updated method
26
+ inputs = gr.Image(type="pil", label="Upload an Image")
27
  outputs = [
28
+ gr.Image(type="pil", label="Detection Output"),
29
+ gr.JSON(label="Detection Results"),
30
  ]
31
 
32
  gr.Interface(