euiia commited on
Commit
eda2fac
·
verified ·
1 Parent(s): 8ec79b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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 = {"pt": {}, "en": {}, "zh": {}}
86
 
87
  # Fallback for missing languages
88
- if 'pt' not in i18n: i18n['pt'] = i18n.get('en', {})
89
- if 'en' not in i18n: i18n['en'] = {}
90
- if 'zh' not in i18n: i18n['zh'] = i18n.get('en', {})
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(["pt", "en", "zh"], 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 ---
 
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 ---