jameslahm commited on
Commit
8a3330e
·
verified ·
1 Parent(s): ba2d16a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,8 +1,10 @@
1
  import PIL.Image as Image
2
  import gradio as gr
 
3
 
4
  from ultralytics import YOLOv10
5
 
 
6
  def predict_image(img, model_id, image_size, conf_threshold):
7
  model = YOLOv10.from_pretrained(f'jameslahm/{model_id}')
8
  results = model.predict(
 
1
  import PIL.Image as Image
2
  import gradio as gr
3
+ import spaces
4
 
5
  from ultralytics import YOLOv10
6
 
7
+ @spaces.GPU
8
  def predict_image(img, model_id, image_size, conf_threshold):
9
  model = YOLOv10.from_pretrained(f'jameslahm/{model_id}')
10
  results = model.predict(