Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -122,49 +122,45 @@ def clear_dynamic_info():
|
|
122 |
gr.Textbox(""),
|
123 |
)
|
124 |
##################################设置各自的app类####################
|
125 |
-
with gr.Blocks(css="app.css") as video:
|
126 |
-
with gr.
|
127 |
-
gr.
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
|
|
132 |
)
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
# value="Submit", interactive=True, scale=1, elem_classes="submit"
|
139 |
-
# )
|
140 |
-
submit_and_rank = gr.Button(
|
141 |
-
value="Score", interactive=True, scale=1, elem_classes="submit"
|
142 |
-
)
|
143 |
-
with gr.Column(scale=2, elem_classes="dl4"):
|
144 |
-
with gr.Row():
|
145 |
-
output_score = gr.Textbox(label="scores")
|
146 |
-
output_statistics = gr.Plot(
|
147 |
-
label="Statistics of emotions", elem_classes="stat"
|
148 |
)
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
|
166 |
-
with gr.Tab("Authors"):
|
167 |
-
gr.Markdown(value=AUTHORS)
|
168 |
|
169 |
clear_btn_dynamic.click(
|
170 |
fn=clear_dynamic_info,
|
@@ -232,12 +228,10 @@ with gr.Blocks() as video_all:
|
|
232 |
with gr.Column(scale=2):
|
233 |
with gr.Row():
|
234 |
output_score = gr.Textbox(label="scores")
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
with gr.Row():
|
240 |
-
output_audio=gr.Audio(interactive=False)
|
241 |
|
242 |
clear_1.click(
|
243 |
fn=clear_video,
|
|
|
122 |
gr.Textbox(""),
|
123 |
)
|
124 |
##################################设置各自的app类####################
|
125 |
+
with gr.Blocks(css="app.css") as video:
|
126 |
+
with gr.Row():
|
127 |
+
with gr.Column(scale=2):
|
128 |
+
input_video = gr.Video(
|
129 |
+
sources=["webcam", "upload"], elem_classes="video1", format='mp4'
|
130 |
+
)
|
131 |
+
with gr.Row():
|
132 |
+
clear_btn_dynamic = gr.Button(
|
133 |
+
value="Clear", interactive=True, scale=1
|
134 |
)
|
135 |
+
# submit_dynamic = gr.Button(
|
136 |
+
# value="Submit", interactive=True, scale=1, elem_classes="submit"
|
137 |
+
# )
|
138 |
+
submit_and_rank = gr.Button(
|
139 |
+
value="Score", interactive=True, scale=1, elem_classes="submit"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
)
|
141 |
+
with gr.Column(scale=2, elem_classes="dl4"):
|
142 |
+
with gr.Row():
|
143 |
+
output_score = gr.Textbox(label="scores")
|
144 |
+
output_statistics = gr.Plot(
|
145 |
+
label="Statistics of emotions", elem_classes="stat"
|
146 |
+
)
|
147 |
+
output_audio=gr.Audio(interactive=False)
|
148 |
+
audio_test_button=gr.Button("分析语音")
|
149 |
+
out1=gr.Textbox(label="语音分析结果")
|
150 |
+
out2=gr.Textbox(label="音频情感识别1")
|
151 |
+
out3=gr.Textbox(label="音频情感识别2")
|
152 |
+
text_test_button=gr.Button("分析文本")
|
153 |
+
text_result=gr.Textbox(interactive=False)
|
154 |
+
gr.Examples(
|
155 |
+
[
|
156 |
+
"videos/video1.mp4",
|
157 |
+
"videos/video2.mp4",
|
158 |
+
"videos/sample.webm",
|
159 |
+
"videos/cnm.mp4",
|
160 |
+
],
|
161 |
+
[input_video],
|
162 |
+
)
|
163 |
|
|
|
|
|
164 |
|
165 |
clear_btn_dynamic.click(
|
166 |
fn=clear_dynamic_info,
|
|
|
228 |
with gr.Column(scale=2):
|
229 |
with gr.Row():
|
230 |
output_score = gr.Textbox(label="scores")
|
231 |
+
output_statistics = gr.Plot(
|
232 |
+
label="Statistics of emotions", elem_classes="stat",visible=True,
|
233 |
+
)
|
234 |
+
output_audio=gr.Audio(interactive=False)
|
|
|
|
|
235 |
|
236 |
clear_1.click(
|
237 |
fn=clear_video,
|