jonathanagustin commited on
Commit
92b9418
1 Parent(s): d146d16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -52,7 +52,7 @@ try:
52
  import numpy as np
53
  import streamlink
54
  from PIL import Image
55
- from super_gradients.training import models
56
  except ImportError:
57
  install_requirements()
58
  import cv2
@@ -61,8 +61,7 @@ except ImportError:
61
  import numpy as np
62
  import streamlink
63
  from PIL import Image
64
- from super_gradients.training import models
65
-
66
 
67
  logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
68
 
@@ -252,7 +251,7 @@ class LiveYouTubeObjectDetector:
252
  def __init__(self):
253
  """Initializes the LiveYouTubeObjectDetector with YOLO model and UI components."""
254
  logging.getLogger().setLevel(logging.DEBUG)
255
- self.model = models.get("yolo_nas_l", pretrained_weights="coco")
256
  self.streams = INITIAL_STREAMS
257
 
258
  # Gradio UI
 
52
  import numpy as np
53
  import streamlink
54
  from PIL import Image
55
+ from ultralytics import YOLO
56
  except ImportError:
57
  install_requirements()
58
  import cv2
 
61
  import numpy as np
62
  import streamlink
63
  from PIL import Image
64
+ from ultralytics import YOLO
 
65
 
66
  logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
67
 
 
251
  def __init__(self):
252
  """Initializes the LiveYouTubeObjectDetector with YOLO model and UI components."""
253
  logging.getLogger().setLevel(logging.DEBUG)
254
+ self.model = YOLO("yolov8x.pt")
255
  self.streams = INITIAL_STREAMS
256
 
257
  # Gradio UI