Spaces:
Runtime error
Runtime error
Commit
·
943ae81
1
Parent(s):
35d6fbc
Update app.py
Browse files
app.py
CHANGED
@@ -25,12 +25,12 @@ image_path= [['test/1.jpg', 'foduucom/stockmarket-future-prediction', 640, 0.25,
|
|
25 |
#############################################################Image Inference############################################################
|
26 |
def yolov8_img_inference(
|
27 |
image: gr.inputs.Image = None,
|
28 |
-
model_path: gr.inputs.Dropdown = "foduucom/stockmarket-future-prediction",
|
29 |
image_size: gr.inputs.Slider = 640,
|
30 |
conf_threshold: gr.inputs.Slider = 0.25,
|
31 |
iou_threshold: gr.inputs.Slider = 0.45
|
32 |
):
|
33 |
-
model = YOLO(model_path)
|
34 |
model.overrides['conf'] = conf_threshold
|
35 |
model.overrides['iou']= iou_threshold
|
36 |
model.overrides['agnostic_nms'] = False # NMS class-agnostic
|
|
|
25 |
#############################################################Image Inference############################################################
|
26 |
def yolov8_img_inference(
|
27 |
image: gr.inputs.Image = None,
|
28 |
+
model_path: gr.inputs.Dropdown = ["foduucom/stockmarket-future-prediction"],
|
29 |
image_size: gr.inputs.Slider = 640,
|
30 |
conf_threshold: gr.inputs.Slider = 0.25,
|
31 |
iou_threshold: gr.inputs.Slider = 0.45
|
32 |
):
|
33 |
+
model = YOLO(model_path[0])
|
34 |
model.overrides['conf'] = conf_threshold
|
35 |
model.overrides['iou']= iou_threshold
|
36 |
model.overrides['agnostic_nms'] = False # NMS class-agnostic
|