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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -20
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=4, interactive=False)
489
  with gr.Column(scale=4):
490
- target = gr.Textbox(label="翻譯文本", lines=4, interactive=False)
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
- 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")
 
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")