ntsc207 commited on
Commit
c6ede3c
·
verified ·
1 Parent(s): 905c48c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -75,6 +75,8 @@ def yolov9_inference(model_id, img_path=None, vid_path=None, tracking_algorithm
75
  output_path = run(weights=model_id, imgsz=(image_size,image_size), conf_thres=conf_threshold, iou_thres=iou_threshold, source=input_path, device='0', hide_conf= True)
76
  # Assuming output_path is the path to the output file
77
  _, output_extension = os.path.splitext(output_path)
 
 
78
  if output_extension.lower() in img_extensions:
79
  output_image = output_path # Load the image file here
80
  elif output_extension.lower() in vid_extensions:
 
75
  output_path = run(weights=model_id, imgsz=(image_size,image_size), conf_thres=conf_threshold, iou_thres=iou_threshold, source=input_path, device='0', hide_conf= True)
76
  # Assuming output_path is the path to the output file
77
  _, output_extension = os.path.splitext(output_path)
78
+ output_image = None
79
+ output_video = None
80
  if output_extension.lower() in img_extensions:
81
  output_image = output_path # Load the image file here
82
  elif output_extension.lower() in vid_extensions: