nehulagrawal commited on
Commit
6a59816
·
1 Parent(s): 903fd68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,7 +24,7 @@ model = YOLO('foduucom/stockmarket-future-prediction')
24
  #############################################################Image Inference############################################################
25
  def yolov8_img_inference(
26
  image: gr.inputs.Image = None,
27
- #model_path: gr.inputs.Dropdown = None,
28
  image_size: gr.inputs.Slider = 640,
29
  conf_threshold: gr.inputs.Slider = 0.25,
30
  iou_threshold: gr.inputs.Slider = 0.45,
@@ -40,7 +40,7 @@ def yolov8_img_inference(
40
  Returns:
41
  Rendered image
42
  """
43
- #model = YOLO(model_path)
44
  model.overrides['conf'] = conf_threshold
45
  model.overrides['iou']= iou_threshold
46
  model.overrides['agnostic_nms'] = False # NMS class-agnostic
 
24
  #############################################################Image Inference############################################################
25
  def yolov8_img_inference(
26
  image: gr.inputs.Image = None,
27
+ model_path: gr.inputs.Dropdown = None,
28
  image_size: gr.inputs.Slider = 640,
29
  conf_threshold: gr.inputs.Slider = 0.25,
30
  iou_threshold: gr.inputs.Slider = 0.45,
 
40
  Returns:
41
  Rendered image
42
  """
43
+ model = YOLO(model_path)
44
  model.overrides['conf'] = conf_threshold
45
  model.overrides['iou']= iou_threshold
46
  model.overrides['agnostic_nms'] = False # NMS class-agnostic