Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,7 @@ from io import BytesIO
|
|
| 10 |
import os
|
| 11 |
|
| 12 |
model = YOLO('best (1).pt')
|
|
|
|
| 13 |
name = ['grenade','knife','pistol','rifle']
|
| 14 |
image_directory = "/home/user/app/image"
|
| 15 |
video_directory = "/home/user/app/video"
|
|
@@ -87,8 +88,7 @@ def response2(image: gr.Image = None,image_size: gr.Slider = 640, conf_threshold
|
|
| 87 |
im_array = r.plot()
|
| 88 |
im = Image.fromarray(im_array[..., ::-1])
|
| 89 |
|
| 90 |
-
|
| 91 |
-
model2 = pipeline('image-classification','Kaludi/csgo-weapon-classification')
|
| 92 |
weapon_name, text_detection = response(image)
|
| 93 |
|
| 94 |
|
|
|
|
| 10 |
import os
|
| 11 |
|
| 12 |
model = YOLO('best (1).pt')
|
| 13 |
+
model2 = pipeline('image-classification','Kaludi/csgo-weapon-classification')
|
| 14 |
name = ['grenade','knife','pistol','rifle']
|
| 15 |
image_directory = "/home/user/app/image"
|
| 16 |
video_directory = "/home/user/app/video"
|
|
|
|
| 88 |
im_array = r.plot()
|
| 89 |
im = Image.fromarray(im_array[..., ::-1])
|
| 90 |
|
| 91 |
+
|
|
|
|
| 92 |
weapon_name, text_detection = response(image)
|
| 93 |
|
| 94 |
|