Update app.py
Browse files
app.py
CHANGED
|
@@ -82,12 +82,12 @@ try:
|
|
| 82 |
i18n = json.load(f)
|
| 83 |
except Exception as e:
|
| 84 |
logger.error(f"Error loading i18n.json: {e}")
|
| 85 |
-
i18n = {"
|
| 86 |
|
| 87 |
# Fallback for missing languages
|
| 88 |
-
if '
|
| 89 |
-
if '
|
| 90 |
-
if '
|
| 91 |
|
| 92 |
# Initialize the main orchestrator from the configuration file
|
| 93 |
try:
|
|
@@ -361,7 +361,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 361 |
subtitle_md = gr.Markdown(default_lang.get('app_subtitle'))
|
| 362 |
|
| 363 |
with gr.Row():
|
| 364 |
-
lang_selector = gr.Radio(["
|
| 365 |
resolution_selector = gr.Radio(["480x480", "720x720", "960x960"], value="480x480", label="Base Resolution")
|
| 366 |
|
| 367 |
# --- Step 1 & 2: Pre-Production ---
|
|
|
|
| 82 |
i18n = json.load(f)
|
| 83 |
except Exception as e:
|
| 84 |
logger.error(f"Error loading i18n.json: {e}")
|
| 85 |
+
i18n = {"🇧🇷": {}, "🇺🇸": {}, "🇨🇳": {}}
|
| 86 |
|
| 87 |
# Fallback for missing languages
|
| 88 |
+
if '🇧🇷' not in i18n: i18n['🇧🇷'] = i18n.get('🇺🇸', {})
|
| 89 |
+
if '🇺🇸' not in i18n: i18n['🇺🇸'] = {}
|
| 90 |
+
if '🇨🇳' not in i18n: i18n['🇨🇳'] = i18n.get('🇺🇸', {})
|
| 91 |
|
| 92 |
# Initialize the main orchestrator from the configuration file
|
| 93 |
try:
|
|
|
|
| 361 |
subtitle_md = gr.Markdown(default_lang.get('app_subtitle'))
|
| 362 |
|
| 363 |
with gr.Row():
|
| 364 |
+
lang_selector = gr.Radio(["🇧🇷", "🇺🇸", "🇨🇳"], value="pt", label=default_lang.get('lang_selector_label'))
|
| 365 |
resolution_selector = gr.Radio(["480x480", "720x720", "960x960"], value="480x480", label="Base Resolution")
|
| 366 |
|
| 367 |
# --- Step 1 & 2: Pre-Production ---
|