coutant commited on
Commit
2676ea4
1 Parent(s): 263d8bf

small change to Interface widget

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,12 +23,12 @@ def inference(img:PIL.Image.Image, threshold):
23
  return detections.imgs[0], predictions.size(dim=0) # image and number of detections
24
 
25
  gr.Interface(
26
- inference,
27
- [
28
  gr.inputs.Image(type="pil", label="Input"),
29
  gr.Slider(minimum=0.5, maximum=0.9, step=0.05, value=0.7, label="Confidence threshold")
30
  ],
31
- [
32
  gr.components.Image(type="pil", label="Output"),
33
  gr.components.Label(label="nb of persons detected for given confidence threshold")
34
  ],
23
  return detections.imgs[0], predictions.size(dim=0) # image and number of detections
24
 
25
  gr.Interface(
26
+ fn = inference,
27
+ inputs = [
28
  gr.inputs.Image(type="pil", label="Input"),
29
  gr.Slider(minimum=0.5, maximum=0.9, step=0.05, value=0.7, label="Confidence threshold")
30
  ],
31
+ outputs = [
32
  gr.components.Image(type="pil", label="Output"),
33
  gr.components.Label(label="nb of persons detected for given confidence threshold")
34
  ],