oilbread commited on
Commit
32d997a
·
1 Parent(s): f028118
Files changed (1) hide show
  1. app.py +2 -2
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 WebRTCStreamer
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 = WebRTCStreamer(label="WebRTC Webcam")
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