Skip to content

Commit

Permalink
fix: locales
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyi-Lin committed Sep 16, 2024
1 parent 74512ef commit 177d4b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions demo/locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,19 +623,19 @@
"face_alignment": {
"en": {
"label": "Face Alignment",
"value": "Open",
"choices": ["Open"],
},
"zh": {
"label": "人脸旋转对齐",
"value": "开启",
"choices": ["开启"],
},
"ja": {
"label": "顔の整列",
"value": "開始",
"choices": ["開始"],
},
"ko": {
"label": "얼굴 정렬",
"value": "시작",
"choices": ["시작"],
},
},
}
6 changes: 3 additions & 3 deletions demo/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create_ui(
demo = gr.Blocks(title="HivisionIDPhotos")

with demo:
gr.HTML(load_description(os.path.join(root_dir, "assets/title.md")))
gr.HTML(load_description(os.path.join(root_dir, "demo/assets/title.md")))
with gr.Row():
# ------------------------ 左半边 UI ------------------------
with gr.Column():
Expand Down Expand Up @@ -82,7 +82,7 @@ def create_ui(
)
face_alignment_options = gr.CheckboxGroup(
label=LOCALES["face_alignment"][DEFAULT_LANG]["label"],
choices=[LOCALES["face_alignment"][DEFAULT_LANG]["value"]],
choices=LOCALES["face_alignment"][DEFAULT_LANG]["choices"],
interactive=True,
)
with gr.Row(visible=True) as size_list_row:
Expand Down Expand Up @@ -496,7 +496,7 @@ def change_language(language):
),
face_alignment_options: gr.update(
label=LOCALES["face_alignment"][language]["label"],
value=LOCALES["face_alignment"][language]["value"],
choices=LOCALES["face_alignment"][language]["choices"],
),
}

Expand Down

0 comments on commit 177d4b6

Please sign in to comment.