kadirnar commited on
Commit
54ba0e5
1 Parent(s): 0ba0ec9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,13 +1,13 @@
1
  import gradio as gr
2
  import os
3
  from huggingface_hub import hf_hub_download
4
-
5
 
6
  def download_models(model_id):
7
  hf_hub_download("merve/yolov9", filename=f"{model_id}", local_dir=f"./")
8
  return f"./{model_id}"
9
 
10
-
11
  def yolov9_inference(img_path, model_id, image_size, conf_threshold, iou_threshold):
12
  """
13
  Load a YOLOv9 model, configure it, perform inference on an image, and optionally adjust
 
1
  import gradio as gr
2
  import os
3
  from huggingface_hub import hf_hub_download
4
+ import spaces
5
 
6
  def download_models(model_id):
7
  hf_hub_download("merve/yolov9", filename=f"{model_id}", local_dir=f"./")
8
  return f"./{model_id}"
9
 
10
+ @spaces.GPU
11
  def yolov9_inference(img_path, model_id, image_size, conf_threshold, iou_threshold):
12
  """
13
  Load a YOLOv9 model, configure it, perform inference on an image, and optionally adjust