DevashishBhake commited on
Commit
9b6527a
β€’
1 Parent(s): 95ee55a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import gradio as gr
2
  from PIL import Image
3
  import numpy as np
4
- from ultralytics import YOLO
5
 
6
- model = YOLO('./best.pt')
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