import gradio as gr from ultralytics import YOLO from huggingface_hub import hf_hub_download REPO_ID = "UEmmanuel5/ProFSAM-Fire-Detector" CKPT = hf_hub_download(REPO_ID, "Fire_best.pt") model = YOLO(CKPT) def detect(img): pred = model.predict(img, imgsz=640, conf=0.3) return pred[0].plot() gr.Interface(fn=detect, inputs=gr.Image(type="pil"), outputs=gr.Image(), title="Fire Detection (YOLOv11n)").launch()