Spaces:
Running
Running
Commit
·
e07f1cc
1
Parent(s):
f727ce9
fix
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
from io import BytesIO
|
4 |
-
import random
|
5 |
|
6 |
# 행동별 KSS 점수 설정 (제곱 값 적용)
|
7 |
kss_mapping = {
|
@@ -87,7 +86,7 @@ with gr.Blocks(
|
|
87 |
with gr.Column():
|
88 |
output_label = gr.Textbox(label="🔍 분석 결과")
|
89 |
output_image = gr.Image(label="📊 위험 수준", height=200, width=200)
|
90 |
-
output_audio = gr.Audio(type='filepath', label="🔊 음성 경고",
|
91 |
output_slider = gr.Slider(minimum=0, maximum=100, step=1, label="⚠️ 위험 수준")
|
92 |
|
93 |
input_img.stream(analyze_frame, [input_img], [output_label, output_image, output_audio])
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
from io import BytesIO
|
|
|
4 |
|
5 |
# 행동별 KSS 점수 설정 (제곱 값 적용)
|
6 |
kss_mapping = {
|
|
|
86 |
with gr.Column():
|
87 |
output_label = gr.Textbox(label="🔍 분석 결과")
|
88 |
output_image = gr.Image(label="📊 위험 수준", height=200, width=200)
|
89 |
+
output_audio = gr.Audio(type='filepath', label="🔊 음성 경고", loop=True, autoplay=True)
|
90 |
output_slider = gr.Slider(minimum=0, maximum=100, step=1, label="⚠️ 위험 수준")
|
91 |
|
92 |
input_img.stream(analyze_frame, [input_img], [output_label, output_image, output_audio])
|