Spaces:
Sleeping
Sleeping
aasw2
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import onnx
|
|
| 5 |
import numpy as np
|
| 6 |
import gradio as gr
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
-
from gradio_webrtc import
|
| 9 |
# --- YOLOv5n ONNX 추론 클래스 (간단히 구현) ---
|
| 10 |
import onnxruntime
|
| 11 |
|
|
@@ -98,7 +98,7 @@ with gr.Blocks() as demo:
|
|
| 98 |
weight_file = gr.File(label="Upload YOLOv5n weights (.pt or .onnx)", file_types=['.pt', '.onnx'])
|
| 99 |
conf_threshold = gr.Slider(0.0, 1.0, value=0.3, step=0.05, label="Confidence Threshold")
|
| 100 |
|
| 101 |
-
rtc_stream =
|
| 102 |
|
| 103 |
output_image = gr.Image(label="Detection Output")
|
| 104 |
|
|
|
|
| 5 |
import numpy as np
|
| 6 |
import gradio as gr
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
+
from gradio_webrtc import WebRTC
|
| 9 |
# --- YOLOv5n ONNX 추론 클래스 (간단히 구현) ---
|
| 10 |
import onnxruntime
|
| 11 |
|
|
|
|
| 98 |
weight_file = gr.File(label="Upload YOLOv5n weights (.pt or .onnx)", file_types=['.pt', '.onnx'])
|
| 99 |
conf_threshold = gr.Slider(0.0, 1.0, value=0.3, step=0.05, label="Confidence Threshold")
|
| 100 |
|
| 101 |
+
rtc_stream = WebRTC(label="WebRTC Webcam")
|
| 102 |
|
| 103 |
output_image = gr.Image(label="Detection Output")
|
| 104 |
|