Spaces:
Runtime error
Runtime error
small change to Interface widget
Browse files
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 |
],
|