Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -505,48 +505,46 @@ with gr.Blocks(css="""
|
|
505 |
|
506 |
# ------------------- 步驟1:錯誤標註 -------------------
|
507 |
# with gr.Group(elem_id="step1_box"):
|
508 |
-
with gr.Row(
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
save_current_button = gr.Button("保存並繼續標記當前資料", elem_id="save_current_button")
|
532 |
|
533 |
with gr.Tab("步驟2:評分與提交"):
|
534 |
# ------------------- 步驟2:評分與提交 -------------------
|
535 |
# with gr.Group(elem_id="step2_box"):
|
536 |
-
with gr.Row(
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
save_next_button = gr.Button("保存並顯示下一筆", elem_id="save_next_button")
|
550 |
|
551 |
# ------------------- 當前狀態 -------------------
|
552 |
status = gr.Textbox(label="當前狀態", lines=1, interactive=False)
|
|
|
505 |
|
506 |
# ------------------- 步驟1:錯誤標註 -------------------
|
507 |
# with gr.Group(elem_id="step1_box"):
|
508 |
+
with gr.Row():
|
509 |
+
error_span = gr.Textbox(label="錯誤區間 (可複製『翻譯文本』貼上)", lines=2)
|
510 |
+
category = gr.Dropdown(
|
511 |
+
label="錯誤類別",
|
512 |
+
choices=list(categories_display.keys()),
|
513 |
+
value="正確性"
|
514 |
+
)
|
515 |
+
subcategory = gr.Dropdown(
|
516 |
+
label="子類別",
|
517 |
+
choices=categories_display["正確性"],
|
518 |
+
value="誤譯"
|
519 |
+
)
|
520 |
+
other = gr.Textbox(label="其他子類別(如選『其他』則填寫)")
|
521 |
+
severity = gr.Dropdown(
|
522 |
+
label="嚴重度",
|
523 |
+
choices=severity_choices_display,
|
524 |
+
value="輕微 (Minor)"
|
525 |
+
)
|
526 |
+
|
527 |
+
with gr.Row():
|
528 |
+
correct_button = gr.Button("✔ 完全正確", elem_id="correct_button")
|
529 |
+
too_many_errors_button = gr.Button("✖ 過多錯誤", elem_id="too_many_errors_button")
|
530 |
+
save_current_button = gr.Button("保存並繼續標記當前資料", elem_id="save_current_button")
|
|
|
531 |
|
532 |
with gr.Tab("步驟2:評分與提交"):
|
533 |
# ------------------- 步驟2:評分與提交 -------------------
|
534 |
# with gr.Group(elem_id="step2_box"):
|
535 |
+
with gr.Row():
|
536 |
+
alternative_translation = gr.Textbox(
|
537 |
+
label="建議翻譯(如有更好譯法可填)",
|
538 |
+
lines=2
|
539 |
+
)
|
540 |
+
score = gr.Slider(
|
541 |
+
label="翻譯評分 (0=最差, 100=最好)",
|
542 |
+
minimum=0,
|
543 |
+
maximum=100,
|
544 |
+
step=1,
|
545 |
+
value=66
|
546 |
+
)
|
547 |
+
save_next_button = gr.Button("保存並顯示下一筆", elem_id="save_next_button")
|
|
|
548 |
|
549 |
# ------------------- 當前狀態 -------------------
|
550 |
status = gr.Textbox(label="當前狀態", lines=1, interactive=False)
|