Spaces:
Runtime error
Runtime error
Update consult.py
Browse files- consult.py +6 -4
consult.py
CHANGED
@@ -165,7 +165,7 @@ with gr.Blocks() as consult:
|
|
165 |
# 请把audio3_2换成Audio组件
|
166 |
with gr.Column(visible=False) as ans3_2: # 语音回答
|
167 |
audio3_2 = gr.Audio(
|
168 |
-
label="语音录制", interactive=True, sources=["microphone"]
|
169 |
) # 对应out_prob.squeeze(0).numpy()[0]
|
170 |
btn3_2 = gr.Button("抱抱你")
|
171 |
result3_21 = gr.Textbox(label="结果3_2")
|
@@ -177,6 +177,7 @@ with gr.Blocks() as consult:
|
|
177 |
interactive=True,
|
178 |
format='mp4',
|
179 |
width=500,
|
|
|
180 |
)
|
181 |
btn3_3 = gr.Button("继续")
|
182 |
result3_31 = gr.Textbox(label="结果3_3")
|
@@ -230,7 +231,7 @@ with gr.Blocks() as consult:
|
|
230 |
# 请把audio4_2换成Audio组件
|
231 |
with gr.Column(visible=False) as ans4_2:
|
232 |
audio4_2 = gr.Audio(
|
233 |
-
label="语音录制", interactive=True, sources=["microphone"]
|
234 |
) # 对应out_prob.squeeze(0).numpy()[0]
|
235 |
btn4_2 = gr.Button("继续")
|
236 |
result4_21 = gr.Textbox(label="结果4_2")
|
@@ -242,6 +243,7 @@ with gr.Blocks() as consult:
|
|
242 |
interactive=True,
|
243 |
format='mp4',
|
244 |
width=500,
|
|
|
245 |
)
|
246 |
btn4_3 = gr.Button("继续")
|
247 |
result4_31 = gr.Textbox(label="结果4_3")
|
@@ -268,7 +270,7 @@ with gr.Blocks() as consult:
|
|
268 |
# 请把audio5_2换成Audio组件
|
269 |
with gr.Column(visible=False) as ans5_2:
|
270 |
audio5_2 = gr.Audio(
|
271 |
-
label="语音录制", interactive=True, sources=["microphone"],
|
272 |
) # 对应out_prob.squeeze(0).numpy()[0]
|
273 |
btn5_2 = gr.Button("提交")
|
274 |
result5_21 = gr.Textbox(label="结果5_2")
|
@@ -276,7 +278,7 @@ with gr.Blocks() as consult:
|
|
276 |
# 请把video5_3换成Video组件
|
277 |
with gr.Column(visible=False) as ans5_3:
|
278 |
# score = gr.Textbox(label="得分")
|
279 |
-
video5_3=gr.Video(sources=["webcam", "upload"],interactive=True,format='mp4',width=500)
|
280 |
btn5_3 = gr.Button("提交")
|
281 |
result5_31 = gr.Textbox(label="结果5_3")
|
282 |
result5_32 = gr.Textbox(label="分数结果5_3",visible=False)
|
|
|
165 |
# 请把audio3_2换成Audio组件
|
166 |
with gr.Column(visible=False) as ans3_2: # 语音回答
|
167 |
audio3_2 = gr.Audio(
|
168 |
+
label="语音录制(录制结束后,请等待语音条闪烁并出现波形后再提交)", interactive=True, sources=["microphone"]
|
169 |
) # 对应out_prob.squeeze(0).numpy()[0]
|
170 |
btn3_2 = gr.Button("抱抱你")
|
171 |
result3_21 = gr.Textbox(label="结果3_2")
|
|
|
177 |
interactive=True,
|
178 |
format='mp4',
|
179 |
width=500,
|
180 |
+
label="视频录制(录制结束后,请等待画面闪烁并再次出现后再提交)",
|
181 |
)
|
182 |
btn3_3 = gr.Button("继续")
|
183 |
result3_31 = gr.Textbox(label="结果3_3")
|
|
|
231 |
# 请把audio4_2换成Audio组件
|
232 |
with gr.Column(visible=False) as ans4_2:
|
233 |
audio4_2 = gr.Audio(
|
234 |
+
label="语音录制(录制结束后,请等待语音条闪烁并出现波形后再提交)", interactive=True, sources=["microphone"]
|
235 |
) # 对应out_prob.squeeze(0).numpy()[0]
|
236 |
btn4_2 = gr.Button("继续")
|
237 |
result4_21 = gr.Textbox(label="结果4_2")
|
|
|
243 |
interactive=True,
|
244 |
format='mp4',
|
245 |
width=500,
|
246 |
+
label="视频录制(录制结束后,请等待画面闪烁并再次出现后再提交)",
|
247 |
)
|
248 |
btn4_3 = gr.Button("继续")
|
249 |
result4_31 = gr.Textbox(label="结果4_3")
|
|
|
270 |
# 请把audio5_2换成Audio组件
|
271 |
with gr.Column(visible=False) as ans5_2:
|
272 |
audio5_2 = gr.Audio(
|
273 |
+
label="语音录制(录制结束后,请等待语音条闪烁并出现波形后再提交)", interactive=True, sources=["microphone"],
|
274 |
) # 对应out_prob.squeeze(0).numpy()[0]
|
275 |
btn5_2 = gr.Button("提交")
|
276 |
result5_21 = gr.Textbox(label="结果5_2")
|
|
|
278 |
# 请把video5_3换成Video组件
|
279 |
with gr.Column(visible=False) as ans5_3:
|
280 |
# score = gr.Textbox(label="得分")
|
281 |
+
video5_3=gr.Video(sources=["webcam", "upload"],interactive=True,format='mp4',width=500,label="视频录制(录制结束后,请等待画面闪烁并再次出现后再提交)")
|
282 |
btn5_3 = gr.Button("提交")
|
283 |
result5_31 = gr.Textbox(label="结果5_3")
|
284 |
result5_32 = gr.Textbox(label="分数结果5_3",visible=False)
|