Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -205,9 +205,10 @@ with gr.Blocks(css=css) as demo:
|
|
205 |
|
206 |
with gr.Tabs():
|
207 |
# 第一个标签页
|
208 |
-
gr.
|
209 |
-
|
210 |
-
|
|
|
211 |
# 第二个标签页
|
212 |
with gr.TabItem("第二步(VLog使用)"):
|
213 |
state = gr.State(get_empty_state())
|
@@ -262,81 +263,11 @@ with gr.Blocks(css=css) as demo:
|
|
262 |
#vidsub_btn.click(subvid_fn, [video_id], [video_inp])
|
263 |
|
264 |
# 第三个标签页
|
265 |
-
with gr.TabItem("第三步(
|
266 |
-
gr.Markdown("##
|
267 |
-
|
268 |
-
|
269 |
-
question1 = gr.Radio(
|
270 |
-
choices=["1", "2", "3", "4", "5"],
|
271 |
-
label="1. What is your favorite color?",
|
272 |
-
)
|
273 |
-
|
274 |
-
# 问题2
|
275 |
-
question2 = gr.Radio(
|
276 |
-
choices=["1", "2", "3", "4", "5"],
|
277 |
-
label="2. What is your preferred mode of transport?",
|
278 |
-
)
|
279 |
-
|
280 |
-
# 问题3
|
281 |
-
question3 = gr.Radio(
|
282 |
-
choices=["1", "2", "3", "4", "5"],
|
283 |
-
label="3. Which type of cuisine do you prefer?",
|
284 |
-
)
|
285 |
-
|
286 |
-
# 问题4
|
287 |
-
question4 = gr.Radio(
|
288 |
-
choices=["1", "2", "3", "4", "5"],
|
289 |
-
label="4. What is your favorite color?",
|
290 |
-
)
|
291 |
-
|
292 |
-
# 问题5
|
293 |
-
question5 = gr.Radio(
|
294 |
-
choices=["1", "2", "3", "4", "5"],
|
295 |
-
label="5. What is your preferred mode of transport?",
|
296 |
-
)
|
297 |
-
|
298 |
-
# 问题6
|
299 |
-
question6 = gr.Radio(
|
300 |
-
choices=["1", "2", "3", "4", "5"],
|
301 |
-
label="6. Which type of cuisine do you prefer?",
|
302 |
-
)
|
303 |
|
304 |
-
# 问题7
|
305 |
-
question7 = gr.Radio(
|
306 |
-
choices=["1", "2", "3", "4", "5"],
|
307 |
-
label="7. Which type of cuisine do you prefer?",
|
308 |
-
)
|
309 |
-
|
310 |
-
# 问题8
|
311 |
-
question8 = gr.Radio(
|
312 |
-
choices=["1", "2", "3", "4", "5"],
|
313 |
-
label="8. What is your favorite color?",
|
314 |
-
)
|
315 |
-
|
316 |
-
# 问题9
|
317 |
-
question9 = gr.Radio(
|
318 |
-
choices=["1", "2", "3", "4", "5"],
|
319 |
-
label="9. What is your preferred mode of transport?",
|
320 |
-
)
|
321 |
-
|
322 |
-
# 问题10
|
323 |
-
question10 = gr.Radio(
|
324 |
-
choices=["1", "2", "3", "4", "5"],
|
325 |
-
label="10. Which type of cuisine do you prefer?",
|
326 |
-
)
|
327 |
-
|
328 |
-
# 提交按钮
|
329 |
-
submit_button = gr.Button("Submit Answers")
|
330 |
-
|
331 |
-
# 显示结果
|
332 |
-
output = gr.Textbox(label="Message")
|
333 |
-
|
334 |
-
# 点击提交按钮时,调用submit_answers函数
|
335 |
-
submit_button.click(
|
336 |
-
submit_answers_posttest,
|
337 |
-
inputs=[question1, question2, question3, question4, question5, question6, question7, question8, question9, question10],
|
338 |
-
outputs=output
|
339 |
-
)
|
340 |
|
341 |
demo.load(queue=False)
|
342 |
|
|
|
205 |
|
206 |
with gr.Tabs():
|
207 |
# 第一个标签页
|
208 |
+
with gr.TabItem("第一步(观看前测试)"):
|
209 |
+
gr.Markdown("""## 在观看视频前,我们先进行一个简单的测试: 由和视频内容相关的六道题目组成
|
210 |
+
请访问 [问卷星](https://www.wjx.cn/vm/hlG7xPb.aspx#) 进行答题。""",
|
211 |
+
elem_id="header")
|
212 |
# 第二个标签页
|
213 |
with gr.TabItem("第二步(VLog使用)"):
|
214 |
state = gr.State(get_empty_state())
|
|
|
263 |
#vidsub_btn.click(subvid_fn, [video_id], [video_inp])
|
264 |
|
265 |
# 第三个标签页
|
266 |
+
with gr.TabItem("第三步(观后测试)"):
|
267 |
+
gr.Markdown("""## 在观看视频前,我们先进行一个简单的测试: 由和视频内容相关的六道题目组成
|
268 |
+
请访问 [问卷星](https://kaoshi.wjx.top/vm/h47xPnF.aspx# ) 进行答题。""",
|
269 |
+
elem_id="header")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
|
272 |
demo.load(queue=False)
|
273 |
|