keremberke commited on
Commit
52dbea9
1 Parent(s): 6982d7b

upload space files

Browse files
.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
- from pathlib import Path
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
- if "test_images":
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

  • SHA256: a2ac8ddc172541efe95ce39f17e95a6458136f4720be265661a3dedb75501016
  • Pointer size: 132 Bytes
  • Size of remote file: 2.63 MB
test_images/test_images/ss2.png ADDED

Git LFS Details

  • SHA256: a17f9cbf4ad2592c216247cd852228e26e72f1a7db27347667b5c1b842fe3536
  • Pointer size: 132 Bytes
  • Size of remote file: 2.17 MB
test_images/test_images/ss3.png ADDED

Git LFS Details

  • SHA256: 5bda60b5dea808e461f7696d7c006f9d1e50214bee0042c984da0679e027bb62
  • Pointer size: 132 Bytes
  • Size of remote file: 2.04 MB
test_images/test_images/ss4.jpg ADDED
test_images/test_images/ss5.jpg ADDED
test_images/test_images/ss6.jpg ADDED