Spaces:
Runtime error
Runtime error
DevashishBhake
commited on
Commit
β’
9b6527a
1
Parent(s):
95ee55a
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
import numpy as np
|
4 |
-
|
5 |
|
6 |
-
model =
|
7 |
|
8 |
def yolo(im, size=512):
|
9 |
g = (size / max(im.size)) # gain
|
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
import numpy as np
|
4 |
+
import torch
|
5 |
|
6 |
+
model = torch.hub.load('./yolov5', 'custom', path='./best.pt', force_reload=True, source='local')
|
7 |
|
8 |
def yolo(im, size=512):
|
9 |
g = (size / max(im.size)) # gain
|