QRcode / app.py
BananaCircuit's picture
Create app.py
6c63420 verified
raw
history blame contribute delete
337 Bytes
import gradio as gr
from ultralytics import YOLO
import cv2
model = YOLO("https://huggingface.co/MiguelEscamilla/id-card-yolo/resolve/main/best.pt")
def detect(image):
results = model(image)
return results[0].plot()
demo = gr.Interface(
fn=detect,
inputs=gr.Image(type="filepath"),
outputs="image"
)
demo.launch()