import gradio as gr from ultralytics import YOLO def run(source): global model return model.predict(source=frame, conf=.5, iou=.5, stream=False, save=True, show=False) model = YOLO("models/yolov8m-nckh2023.pt") # Select YOLO model iface = gr.Interface(fn=run, inputs="text", outputs="image") iface.launch()