Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from ultralytics import YOLO | |
| import numpy as np | |
| # Load trained signboard model | |
| model = YOLO("best.pt") | |
| def detect_signboard(image): | |
| results = model(image) | |
| annotated_image = results[0].plot() | |
| return annotated_image | |
| demo = gr.Interface( | |
| fn=detect_signboard, | |
| inputs=gr.Image(type="numpy", label="Upload Image"), | |
| outputs=gr.Image(label="Detected Signboard"), | |
| title="Signboard Detection System", | |
| description="This system detects signboards using a trained YOLOv8 model." | |
| ) | |
| if __name__== "__main__": | |
| demo.launch() |