kadirnar commited on
Commit
8af2e88
·
verified ·
1 Parent(s): 0dbae78

Update app.py

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