kisa-misa's picture
Update app.py
799e5e1
raw
history blame
472 Bytes
import subprocess
import tempfile
import time
from pathlib import Path
import cv2
import gradio as gr
import torch
from ultralytics.yolo.v8.detect.predict import predict
def fn_image(image):
return predict(model=yolov8x6, source=image)
gr.Interface(
fn_image,
inputs=[
gr.Image(source='webcam', streaming=True),
],
outputs=gr.Image(type="file"),
live=True,
title="YOLOv8",
allow_flagging=False,
allow_screenshot=False,
)