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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -38
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(equal_height=True):
509
- with gr.Row():
510
- error_span = gr.Textbox(label="錯誤區間 (可複製『翻譯文本』貼上)", lines=2)
511
- category = gr.Dropdown(
512
- label="錯誤類別",
513
- choices=list(categories_display.keys()),
514
- value="正確性"
515
- )
516
- subcategory = gr.Dropdown(
517
- label="子類別",
518
- choices=categories_display["正確性"],
519
- value="誤譯"
520
- )
521
- other = gr.Textbox(label="其他子類別(如選『其他』則填寫)")
522
- severity = gr.Dropdown(
523
- label="嚴重度",
524
- choices=severity_choices_display,
525
- value="輕微 (Minor)"
526
- )
527
-
528
- with gr.Row():
529
- correct_button = gr.Button(" 完全正確", elem_id="correct_button")
530
- too_many_errors_button = gr.Button("✖ 過多錯誤", elem_id="too_many_errors_button")
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(equal_height=True):
537
- with gr.Row():
538
- alternative_translation = gr.Textbox(
539
- label="建議翻譯(如有更好譯法可填)",
540
- lines=2
541
- )
542
- score = gr.Slider(
543
- label="翻譯評分 (0=最差, 100=最好)",
544
- minimum=0,
545
- maximum=100,
546
- step=1,
547
- value=66
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)