Spaces:
Runtime error
Runtime error
Commit
·
52dbea9
1
Parent(s):
6982d7b
upload space files
Browse files- .gitattributes +3 -0
- app.py +2 -10
- test_images/test_images/ss.png +3 -0
- test_images/test_images/ss2.png +3 -0
- test_images/test_images/ss3.png +3 -0
- test_images/test_images/ss4.jpg +0 -0
- test_images/test_images/ss5.jpg +0 -0
- test_images/test_images/ss6.jpg +0 -0
.gitattributes
CHANGED
@@ -35,3 +35,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
35 |
test_images/ss.png filter=lfs diff=lfs merge=lfs -text
|
36 |
test_images/ss2.png filter=lfs diff=lfs merge=lfs -text
|
37 |
test_images/ss3.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
35 |
test_images/ss.png filter=lfs diff=lfs merge=lfs -text
|
36 |
test_images/ss2.png filter=lfs diff=lfs merge=lfs -text
|
37 |
test_images/ss3.png filter=lfs diff=lfs merge=lfs -text
|
38 |
+
test_images/test_images/ss.png filter=lfs diff=lfs merge=lfs -text
|
39 |
+
test_images/test_images/ss2.png filter=lfs diff=lfs merge=lfs -text
|
40 |
+
test_images/test_images/ss3.png filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
|
2 |
-
import os
|
3 |
import json
|
4 |
import gradio as gr
|
5 |
import yolov5
|
@@ -13,14 +12,7 @@ article = f"<p style='text-align: center'> <a href='https://huggingface.co/{mode
|
|
13 |
current_model_id = models_ids[-1]
|
14 |
model = yolov5.load(current_model_id)
|
15 |
|
16 |
-
|
17 |
-
image_filenames = os.listdir(test_images)
|
18 |
-
examples = [
|
19 |
-
[Path(test_images) / image_filename, 0.25, models_ids[-1]]
|
20 |
-
for image_filename in image_filenames
|
21 |
-
]
|
22 |
-
else:
|
23 |
-
examples = None
|
24 |
|
25 |
|
26 |
def predict(image, threshold=0.25, model_id=None):
|
|
|
1 |
+
|
|
|
2 |
import json
|
3 |
import gradio as gr
|
4 |
import yolov5
|
|
|
12 |
current_model_id = models_ids[-1]
|
13 |
model = yolov5.load(current_model_id)
|
14 |
|
15 |
+
examples = [[WindowsPath('space_content/test_images/ss.png'), 0.25, 'keremberke/yolov5m-valorant'], [WindowsPath('space_content/test_images/ss2.png'), 0.25, 'keremberke/yolov5m-valorant'], [WindowsPath('space_content/test_images/ss3.png'), 0.25, 'keremberke/yolov5m-valorant'], [WindowsPath('space_content/test_images/ss4.jpg'), 0.25, 'keremberke/yolov5m-valorant'], [WindowsPath('space_content/test_images/ss5.jpg'), 0.25, 'keremberke/yolov5m-valorant'], [WindowsPath('space_content/test_images/ss6.jpg'), 0.25, 'keremberke/yolov5m-valorant'], [WindowsPath('space_content/test_images/test_images'), 0.25, 'keremberke/yolov5m-valorant']]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
|
18 |
def predict(image, threshold=0.25, model_id=None):
|
test_images/test_images/ss.png
ADDED
![]() |
Git LFS Details
|
test_images/test_images/ss2.png
ADDED
![]() |
Git LFS Details
|
test_images/test_images/ss3.png
ADDED
![]() |
Git LFS Details
|
test_images/test_images/ss4.jpg
ADDED
![]() |
test_images/test_images/ss5.jpg
ADDED
![]() |
test_images/test_images/ss6.jpg
ADDED
![]() |