350016z commited on
Commit
a8882e4
·
verified ·
1 Parent(s): d464079

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -16
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=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)&錯誤紀錄表 -------------------
@@ -507,21 +507,25 @@ with gr.Blocks(css="""
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")
 
485
 
486
  # 左: 原始文本 / 右: 翻譯文本
487
  with gr.Column(scale=4):
488
+ source = gr.Textbox(label="原始文本", lines=14, interactive=False)
489
  with gr.Column(scale=4):
490
+ target = gr.Textbox(label="翻譯文本", lines=14, interactive=False)
491
 
492
  with gr.Tab("步驟1:錯誤標註"):
493
  # ------------------- 螢光標記區(用 Group + elem_id)&錯誤紀錄表 -------------------
 
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=2, 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.Dropdown(
525
+ label="嚴重程度",
526
+ choices=severity_choices_display,
527
+ value="輕微 (Minor)"
528
+ )
529
 
530
  with gr.Row():
531
  correct_button = gr.Button("✔ 完全正確", elem_id="correct_button")