Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,10 +18,31 @@ def detect(image):
|
|
| 18 |
|
| 19 |
return annotated_image
|
| 20 |
|
| 21 |
-
gr.
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
return annotated_image
|
| 20 |
|
| 21 |
+
gradio_app = gr.Blocks()
|
| 22 |
+
with gradio_app:
|
| 23 |
+
gr.HTML(
|
| 24 |
+
"""
|
| 25 |
+
<h1 style='text-align: center'>
|
| 26 |
+
YOLOv10: Real-Time End-to-End Object Detection
|
| 27 |
+
</h1>
|
| 28 |
+
""")
|
| 29 |
+
gr.HTML(
|
| 30 |
+
"""
|
| 31 |
+
<h3 style='text-align: center'>
|
| 32 |
+
Follow me for more!
|
| 33 |
+
<a href='https://twitter.com/kadirnar_ai' target='_blank'>Twitter</a> | <a href='https://github.com/kadirnar' target='_blank'>Github</a> | <a href='https://www.linkedin.com/in/kadir-nar/' target='_blank'>Linkedin</a> | <a href='https://www.huggingface.co/kadirnar/' target='_blank'>HuggingFace</a>
|
| 34 |
+
</h3>
|
| 35 |
+
""")
|
| 36 |
+
|
| 37 |
+
input_image = gr.inputs.Image(type="numpy")
|
| 38 |
+
output_image = gr.outputs.Image(type="numpy", label="Annotated Image")
|
| 39 |
+
|
| 40 |
+
gr.Interface(
|
| 41 |
+
fn=detect,
|
| 42 |
+
inputs=input_image,
|
| 43 |
+
outputs=output_image,
|
| 44 |
+
title='YOLOv10 Object Detection',
|
| 45 |
+
description='Detect objects in images using the YOLOv10 model'
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
gradio_app.launch()
|