Spaces:
Build error
Build error
Youngsun Lim commited on
Commit ·
41e996c
1
Parent(s): 125b5ca
2nd axis
Browse files
app.py
CHANGED
|
@@ -109,12 +109,13 @@ INSTRUCTION_MD = """
|
|
| 109 |
**Task:** You will watch a series of **AI-generated videos**.
|
| 110 |
For each video, your job is to rate:
|
| 111 |
|
| 112 |
-
1. **Action Consistency**
|
| 113 |
-
2. **Physical Plausibility**
|
| 114 |
|
| 115 |
Some things to keep in mind:
|
| 116 |
- The generated video should **capture** the expected action **throughout the video**.
|
| 117 |
- Motions should look **smooth and realistic**, without impossible poses, missing limbs, or extreme stretching.
|
|
|
|
| 118 |
- Try to **focus only** on the expected action and motion quality, and do **not** judge **video quality**, **attractiveness**, **background**, **camera motion**, or **objects**.
|
| 119 |
- You will be **paid** once **all the videos are viewed and rated**.
|
| 120 |
"""
|
|
@@ -174,12 +175,24 @@ def _read_csv_bytes():
|
|
| 174 |
return None
|
| 175 |
|
| 176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
def _append(old_bytes, row):
|
| 178 |
s = io.StringIO()
|
| 179 |
w = csv.writer(s)
|
| 180 |
if not old_bytes:
|
| 181 |
-
# ✅
|
| 182 |
-
w.writerow(["ts_iso", "participant_id", "video_id",
|
|
|
|
| 183 |
else:
|
| 184 |
s.write(old_bytes.decode("utf-8", errors="ignore"))
|
| 185 |
w.writerow(row)
|
|
@@ -555,12 +568,26 @@ with gr.Blocks(css=CLEAN_BG_CSS) as demo:
|
|
| 555 |
gr.Markdown(INSTRUCTION_MD) # 교수님 문구 그대로
|
| 556 |
video = gr.Video(label="Video", height=360)
|
| 557 |
progress = gr.HTML(_progress_html(0, TOTAL_PER_PARTICIPANT))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 558 |
with gr.Column(scale=1):
|
| 559 |
action_tb = gr.Textbox(label="Expected action", interactive=False)
|
| 560 |
-
|
| 561 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 562 |
save_next = gr.Button("💾 Save & Next ▶", variant="secondary", interactive=False)
|
| 563 |
|
|
|
|
| 564 |
status = gr.Markdown(visible=False)
|
| 565 |
done_state = gr.State(0)
|
| 566 |
|
|
|
|
| 109 |
**Task:** You will watch a series of **AI-generated videos**.
|
| 110 |
For each video, your job is to rate:
|
| 111 |
|
| 112 |
+
1. **Action Consistency** - how well the person’s action matches the action specified as the "**expected action**".
|
| 113 |
+
2. **Physical Plausibility** - how natural and physically possible the motion looks.
|
| 114 |
|
| 115 |
Some things to keep in mind:
|
| 116 |
- The generated video should **capture** the expected action **throughout the video**.
|
| 117 |
- Motions should look **smooth and realistic**, without impossible poses, missing limbs, or extreme stretching.
|
| 118 |
+
- **High Action Consistency doesn’t always mean high Physical Plausibility, and vice versa.**
|
| 119 |
- Try to **focus only** on the expected action and motion quality, and do **not** judge **video quality**, **attractiveness**, **background**, **camera motion**, or **objects**.
|
| 120 |
- You will be **paid** once **all the videos are viewed and rated**.
|
| 121 |
"""
|
|
|
|
| 175 |
return None
|
| 176 |
|
| 177 |
|
| 178 |
+
# def _append(old_bytes, row):
|
| 179 |
+
# s = io.StringIO()
|
| 180 |
+
# w = csv.writer(s)
|
| 181 |
+
# if not old_bytes:
|
| 182 |
+
# # ✅ 새 헤더
|
| 183 |
+
# w.writerow(["ts_iso", "participant_id", "video_id", "overall", "notes"])
|
| 184 |
+
# else:
|
| 185 |
+
# s.write(old_bytes.decode("utf-8", errors="ignore"))
|
| 186 |
+
# w.writerow(row)
|
| 187 |
+
# return s.getvalue().encode("utf-8")
|
| 188 |
+
|
| 189 |
def _append(old_bytes, row):
|
| 190 |
s = io.StringIO()
|
| 191 |
w = csv.writer(s)
|
| 192 |
if not old_bytes:
|
| 193 |
+
# ✅ new header with two scores
|
| 194 |
+
w.writerow(["ts_iso", "participant_id", "video_id",
|
| 195 |
+
"action_consistency", "physical_plausibility", "notes"])
|
| 196 |
else:
|
| 197 |
s.write(old_bytes.decode("utf-8", errors="ignore"))
|
| 198 |
w.writerow(row)
|
|
|
|
| 568 |
gr.Markdown(INSTRUCTION_MD) # 교수님 문구 그대로
|
| 569 |
video = gr.Video(label="Video", height=360)
|
| 570 |
progress = gr.HTML(_progress_html(0, TOTAL_PER_PARTICIPANT))
|
| 571 |
+
# with gr.Column(scale=1):
|
| 572 |
+
# action_tb = gr.Textbox(label="Expected action", interactive=False)
|
| 573 |
+
# score = gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=5.0,
|
| 574 |
+
# label="Action Consistency (0.0 (Worst) - 10.0 (Best))")
|
| 575 |
+
# save_next = gr.Button("💾 Save & Next ▶", variant="secondary", interactive=False)
|
| 576 |
with gr.Column(scale=1):
|
| 577 |
action_tb = gr.Textbox(label="Expected action", interactive=False)
|
| 578 |
+
# NEW: two separate sliders
|
| 579 |
+
score_action = gr.Slider(
|
| 580 |
+
minimum=0.0, maximum=10.0, step=0.1, value=5.0,
|
| 581 |
+
label="Action Consistency (0.0 - 10.0)"
|
| 582 |
+
)
|
| 583 |
+
score_phys = gr.Slider(
|
| 584 |
+
minimum=0.0, maximum=10.0, step=0.1, value=5.0,
|
| 585 |
+
label="Physical Plausibility (0.0 - 10.0)"
|
| 586 |
+
)
|
| 587 |
+
|
| 588 |
save_next = gr.Button("💾 Save & Next ▶", variant="secondary", interactive=False)
|
| 589 |
|
| 590 |
+
|
| 591 |
status = gr.Markdown(visible=False)
|
| 592 |
done_state = gr.State(0)
|
| 593 |
|