kisa-misa's picture
Update app.py
a9dec7c
raw
history blame
511 Bytes
import subprocess
import tempfile
import time
from pathlib import Path
import cv2
import gradio as gr
import torch
from inferer import Inferer
pipeline = Inferer(pipeline = Inferer(predict.py, model='yolov8x6.pt', source='webcam'))
def fn_image(image):
return pipeline(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,
)