Update app.py
Browse files
app.py
CHANGED
|
@@ -401,22 +401,21 @@ def spacy_update_ui(ui_lang: str):
|
|
| 401 |
ui_config = SPACY_UI_TEXT.get(ui_lang.lower(), SPACY_UI_TEXT["en"])
|
| 402 |
# --- Return component UPDATES, not new components ---
|
| 403 |
return [
|
| 404 |
-
gr.
|
| 405 |
-
gr.
|
| 406 |
gr.update(label=ui_config["ui_lang_label"]),
|
| 407 |
gr.update(label=ui_config["model_lang_label"]),
|
| 408 |
-
gr.
|
| 409 |
-
gr.
|
| 410 |
gr.update(label=ui_config["tab_graphic"]),
|
| 411 |
gr.update(label=ui_config["tab_table"]),
|
| 412 |
gr.update(label=ui_config["tab_json"]),
|
| 413 |
gr.update(label=ui_config["tab_ner"]),
|
| 414 |
-
gr.
|
| 415 |
-
gr.
|
| 416 |
-
gr.
|
| 417 |
-
gr.
|
| 418 |
]
|
| 419 |
-
# --- End component updates ---
|
| 420 |
|
| 421 |
# ============================================================================
|
| 422 |
# 4. LANGUAGETOOL LOGIC (from languagetool-server.py)
|
|
|
|
| 401 |
ui_config = SPACY_UI_TEXT.get(ui_lang.lower(), SPACY_UI_TEXT["en"])
|
| 402 |
# --- Return component UPDATES, not new components ---
|
| 403 |
return [
|
| 404 |
+
gr.update(value=ui_config["title"]),
|
| 405 |
+
gr.update(value=ui_config["subtitle"]),
|
| 406 |
gr.update(label=ui_config["ui_lang_label"]),
|
| 407 |
gr.update(label=ui_config["model_lang_label"]),
|
| 408 |
+
gr.update(label=ui_config["input_label"], placeholder=ui_config["input_placeholder"]),
|
| 409 |
+
gr.update(value=ui_config["button_text"]),
|
| 410 |
gr.update(label=ui_config["tab_graphic"]),
|
| 411 |
gr.update(label=ui_config["tab_table"]),
|
| 412 |
gr.update(label=ui_config["tab_json"]),
|
| 413 |
gr.update(label=ui_config["tab_ner"]),
|
| 414 |
+
gr.update(label=ui_config["html_label"]),
|
| 415 |
+
gr.update(label=ui_config["table_label"], headers=ui_config["table_headers"]),
|
| 416 |
+
gr.update(label=ui_config["json_label"]),
|
| 417 |
+
gr.update(label=ui_config["ner_label"])
|
| 418 |
]
|
|
|
|
| 419 |
|
| 420 |
# ============================================================================
|
| 421 |
# 4. LANGUAGETOOL LOGIC (from languagetool-server.py)
|