Spaces:
Runtime error
Runtime error
File size: 598 Bytes
fffd654 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
from ultralytics import YOLO
# Modeli yükle
model = YOLO("yolov8n.pt") # Küçük ve hızlı YOLOv8 modeli
# Video işleme fonksiyonu
def process_video(video):
results = model(video) # Videoyu modelle işleyin
output_path = "output.mp4"
results.save(output_path) # İşlenmiş videoyu kaydedin
return output_path
# Gradio arayüzü
iface = gr.Interface(
fn=process_video,
inputs=gr.Video(type="mp4"),
outputs=gr.Video(),
title="Nesne Tanıma Aracı",
description="Videodaki nesneleri tanıyan bir yapay zeka aracı."
)
iface.launch()
|