Ashegh-Sad-Warrior
commited on
Commit
•
bbadb3f
1
Parent(s):
ecbd1be
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ import tempfile
|
|
14 |
import os
|
15 |
|
16 |
# Check if the model file exists
|
17 |
-
if os.path.exists('/
|
18 |
print("Model file found.")
|
19 |
else:
|
20 |
print("Model file not found. Please upload 'best.pt' to the Space.")
|
@@ -235,9 +235,9 @@ image_interface = gr.Interface(
|
|
235 |
title="Object Detection in Aerial Images",
|
236 |
description="Upload an aerial image to see detected objects and their counts.",
|
237 |
examples=[
|
238 |
-
'/
|
239 |
-
'/
|
240 |
-
'/
|
241 |
]
|
242 |
)
|
243 |
|
@@ -249,8 +249,8 @@ video_interface = gr.Interface(
|
|
249 |
title="Object Detection in Videos",
|
250 |
description="Upload a video to see detected objects and their counts.",
|
251 |
examples=[
|
252 |
-
'/
|
253 |
-
'/
|
254 |
]
|
255 |
)
|
256 |
|
|
|
14 |
import os
|
15 |
|
16 |
# Check if the model file exists
|
17 |
+
if os.path.exists('weights/best.pt'):
|
18 |
print("Model file found.")
|
19 |
else:
|
20 |
print("Model file not found. Please upload 'best.pt' to the Space.")
|
|
|
235 |
title="Object Detection in Aerial Images",
|
236 |
description="Upload an aerial image to see detected objects and their counts.",
|
237 |
examples=[
|
238 |
+
'Examples/images/areial_car.jpg',
|
239 |
+
'Examples/images/images.jpg',
|
240 |
+
'Examples/images/t.jpg'
|
241 |
]
|
242 |
)
|
243 |
|
|
|
249 |
title="Object Detection in Videos",
|
250 |
description="Upload a video to see detected objects and their counts.",
|
251 |
examples=[
|
252 |
+
'Examples/video/airplane.mp4',
|
253 |
+
'Examples/video/city.mp4'
|
254 |
]
|
255 |
)
|
256 |
|