Ubuntu
commited on
Commit
·
368ef8a
1
Parent(s):
167fff3
added css
Browse files
app.py
CHANGED
@@ -14,10 +14,18 @@ def detect_hotspots(image):
|
|
14 |
return Image.fromarray(im_array[..., ::-1])
|
15 |
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
demo = gr.Interface(fn=detect_hotspots, inputs=gr.Image(type='pil'), outputs="image", title="YOLO Object Detection",
|
18 |
examples=[['images/test_image_1.jpg'], ['images/test_image_2.jpg'],
|
19 |
['images/test_image_3.jpg'], ['images/test_image_4.jpg']],
|
20 |
examples_per_page=4,
|
21 |
-
cache_examples= False
|
|
|
22 |
)
|
23 |
demo.launch()
|
|
|
14 |
return Image.fromarray(im_array[..., ::-1])
|
15 |
|
16 |
|
17 |
+
css = """
|
18 |
+
.gr-example img {
|
19 |
+
width: 300px !important;
|
20 |
+
height: auto !important;
|
21 |
+
}
|
22 |
+
"""
|
23 |
+
|
24 |
demo = gr.Interface(fn=detect_hotspots, inputs=gr.Image(type='pil'), outputs="image", title="YOLO Object Detection",
|
25 |
examples=[['images/test_image_1.jpg'], ['images/test_image_2.jpg'],
|
26 |
['images/test_image_3.jpg'], ['images/test_image_4.jpg']],
|
27 |
examples_per_page=4,
|
28 |
+
cache_examples= False,
|
29 |
+
css=css
|
30 |
)
|
31 |
demo.launch()
|