Spaces:
Runtime error
Runtime error
Aleksander Bojda
commited on
Commit
·
081f351
1
Parent(s):
d3b23a0
Limit output image height
Browse files
app.py
CHANGED
@@ -16,12 +16,12 @@ def predict(img, model_type):
|
|
16 |
|
17 |
# Interface
|
18 |
inputs = [
|
19 |
-
|
20 |
gr.Dropdown(["yolov5s", "yolov5m"], label="Model", value="yolov5s"),
|
21 |
]
|
22 |
|
23 |
outputs = [
|
24 |
-
"image"
|
25 |
]
|
26 |
|
27 |
examples = [
|
@@ -31,5 +31,12 @@ examples = [
|
|
31 |
["examples/ex4.jpg", None],
|
32 |
]
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
iface.launch()
|
|
|
16 |
|
17 |
# Interface
|
18 |
inputs = [
|
19 |
+
gr.Image(),
|
20 |
gr.Dropdown(["yolov5s", "yolov5m"], label="Model", value="yolov5s"),
|
21 |
]
|
22 |
|
23 |
outputs = [
|
24 |
+
gr.Image(elem_classes="output-image")
|
25 |
]
|
26 |
|
27 |
examples = [
|
|
|
31 |
["examples/ex4.jpg", None],
|
32 |
]
|
33 |
|
34 |
+
css = ".output-image {height: 700px !important}"
|
35 |
+
|
36 |
+
iface = gr.Interface(fn=predict,
|
37 |
+
inputs=inputs,
|
38 |
+
outputs=outputs,
|
39 |
+
examples=examples,
|
40 |
+
cache_examples=False,
|
41 |
+
css=css)
|
42 |
iface.launch()
|