Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,8 +7,14 @@ from PIL import Image
|
|
| 7 |
from pytorch_grad_cam import GradCAM
|
| 8 |
from pytorch_grad_cam.utils.image import show_cam_on_image
|
| 9 |
import gradio as gr
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
model =
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
classes = ('ball', 'goalkeeper', 'player', 'referee')
|
| 14 |
|
|
|
|
| 7 |
from pytorch_grad_cam import GradCAM
|
| 8 |
from pytorch_grad_cam.utils.image import show_cam_on_image
|
| 9 |
import gradio as gr
|
| 10 |
+
from huggingface_hub import hf_hub_download
|
| 11 |
+
import yolo9
|
| 12 |
|
| 13 |
+
model = yolo9.load('best.pt')
|
| 14 |
+
|
| 15 |
+
# Set model parameters
|
| 16 |
+
model.conf = conf_threshold
|
| 17 |
+
model.iou = iou_threshold
|
| 18 |
|
| 19 |
classes = ('ball', 'goalkeeper', 'player', 'referee')
|
| 20 |
|