Wenjiawang0312 commited on
Commit
9eee075
·
1 Parent(s): f3c78a2
Files changed (1) hide show
  1. app.py +17 -5
app.py CHANGED
@@ -180,19 +180,31 @@ def create_video_survey_app():
180
  gr.Markdown(f"## 场景 {scene_idx + 1} / Scene {scene_idx + 1}: `{scene_name}`")
181
 
182
  # 4个视频横向排列
183
- with gr.Row(equal_height=True):
184
  scene_ratings = []
185
  for i in range(4):
186
  method_name = f"Method {chr(65+i)}"
187
 
188
- with gr.Column(scale=1, min_width=200):
189
  gr.Markdown(f"### 🎥 {method_name}")
190
 
191
- # 视频
192
  if method_name in videos:
193
- video = gr.Video(value=videos[method_name], label="", height=250, width=200)
 
 
 
 
 
 
194
  else:
195
- video = gr.Video(value=None, label="", height=250, width=200, visible=False)
 
 
 
 
 
 
196
 
197
  # 三个评分滑块(垂直排列)
198
  # 只在第一个场景显示详细说明
 
180
  gr.Markdown(f"## 场景 {scene_idx + 1} / Scene {scene_idx + 1}: `{scene_name}`")
181
 
182
  # 4个视频横向排列
183
+ with gr.Row(equal_height=True, variant="compact"):
184
  scene_ratings = []
185
  for i in range(4):
186
  method_name = f"Method {chr(65+i)}"
187
 
188
+ with gr.Column(scale=1, min_width=0):
189
  gr.Markdown(f"### 🎥 {method_name}")
190
 
191
+ # 视频 - 使用 autoplay=False 确保一致性
192
  if method_name in videos:
193
+ video = gr.Video(
194
+ value=videos[method_name],
195
+ label="",
196
+ height=400,
197
+ autoplay=False,
198
+ show_label=False
199
+ )
200
  else:
201
+ video = gr.Video(
202
+ value=None,
203
+ label="",
204
+ height=400,
205
+ visible=False,
206
+ show_label=False
207
+ )
208
 
209
  # 三个评分滑块(垂直排列)
210
  # 只在第一个场景显示详细说明