Spaces:
Runtime error
Runtime error
Update app.py
Browse files7 unmodified lines89101112131410 unmodified lines2526272829303113 unmodified lines4546474849505124 unmodified lines767778798081827 unmodified lines# return f"./{model_id}"def yolov9_inference(img_path, model_id, image_size, conf_threshold, iou_threshold):"""Load a YOLOv9 model, configure it, perform inference on an image, and optionally adjustthe input size and apply test time augmentation.10 unmodified lines# Load the model# model_path = download_models()model = yolov9.load(best.pt, device="cuda:0")# Set model parametersmodel.conf = conf_threshold13 unmodified lineswith gr.Row():with gr.Column():img_path = gr.Image(type="filepath", label="Image")model_path = "best.pt"image_size = gr.Slider(label="Image Size",minimum=320,24 unmodified linesfn=yolov9_inference,inputs=[img_path,model_path,image_size,conf_threshold,iou_threshold,7 unmodified lines89101112131410 unmodified lines2526272829303113 unmodified lines45464748495024 unmodified lines757677787980817 unmodified lines# return f"./{model_id}"def yolov9_inference(img_path, image_size, conf_threshold, iou_threshold):"""Load a YOLOv9 model, configure it, perform inference on an image, and optionally adjustthe input size and apply test time augmentation.10 unmodified lines# Load the model# model_path = download_models()model = yolov9.load("./best.pt")# Set model parametersmodel.conf = conf_threshold13 unmodified lineswith gr.Row():with gr.Column():img_path = gr.Image(type="filepath", label="Image")image_size = gr.Slider(label="Image Size",minimum=320,24 unmodified linesfn=yolov9_inference,inputs=[img_path,# model_path,image_size,conf_threshold,iou_threshold,
app.py+3-4