Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -485,9 +485,9 @@ with gr.Blocks(css="""
|
|
485 |
|
486 |
# 左: 原始文本 / 右: 翻譯文本
|
487 |
with gr.Column(scale=4):
|
488 |
-
source = gr.Textbox(label="原始文本", lines=
|
489 |
with gr.Column(scale=4):
|
490 |
-
target = gr.Textbox(label="翻譯文本", lines=
|
491 |
|
492 |
with gr.Tab("步驟1:錯誤標註"):
|
493 |
# ------------------- 螢光標記區(用 Group + elem_id)&錯誤紀錄表 -------------------
|
@@ -505,24 +505,23 @@ 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 |
-
value="輕微 (Minor)"
|
525 |
-
)
|
526 |
|
527 |
with gr.Row():
|
528 |
correct_button = gr.Button("✔ 完全正確", elem_id="correct_button")
|
|
|
485 |
|
486 |
# 左: 原始文本 / 右: 翻譯文本
|
487 |
with gr.Column(scale=4):
|
488 |
+
source = gr.Textbox(label="原始文本", lines=10, interactive=False)
|
489 |
with gr.Column(scale=4):
|
490 |
+
target = gr.Textbox(label="翻譯文本", lines=10, interactive=False)
|
491 |
|
492 |
with gr.Tab("步驟1:錯誤標註"):
|
493 |
# ------------------- 螢光標記區(用 Group + elem_id)&錯誤紀錄表 -------------------
|
|
|
505 |
|
506 |
# ------------------- 步驟1:錯誤標註 -------------------
|
507 |
# with gr.Group(elem_id="step1_box"):
|
508 |
+
with gr.Row(equal_height=True):
|
509 |
+
with gr.Column(scale=1):
|
510 |
+
error_span = gr.Textbox(label="錯誤區間 (💡可以直接複製「翻譯文本」欄位,並在此貼上)", lines=6, placeholder="請輸入翻譯中文本的錯誤區間 (如無錯誤則不需)")
|
511 |
+
with gr.Column(scale=1):
|
512 |
+
#with gr.Row(equal_height=True):
|
513 |
+
category = gr.Dropdown(
|
514 |
+
label="錯誤類別",
|
515 |
+
choices=list(categories_display.keys()),
|
516 |
+
value="正確性"
|
517 |
+
)
|
518 |
+
subcategory = gr.Dropdown(
|
519 |
+
label="子類別",
|
520 |
+
choices=categories_display["正確性"],
|
521 |
+
value="誤譯"
|
522 |
+
)
|
523 |
+
other = gr.Textbox(label="其他子類別(如選『其他』則填寫)")
|
524 |
+
severity = gr.Radio(label="錯誤嚴重程度", choices=severity_choices_display, value="輕微 (Minor)")
|
|
|
525 |
|
526 |
with gr.Row():
|
527 |
correct_button = gr.Button("✔ 完全正確", elem_id="correct_button")
|