LoloSemper commited on
Commit
0527d51
·
verified ·
1 Parent(s): df7fb9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -3
app.py CHANGED
@@ -350,7 +350,7 @@ def _es_conj_regular(lemma, tense, person):
350
  "er":{"1s":"o","2s":"es","3s":"e","1p":"emos","2p":"éis","3p":"en"},
351
  "ir":{"1s":"o","2s":"es","3s":"e","1p":"imos","2p":"ís","3p":"en"}}
352
  pret={"ar":{"1s":"é","2s":"aste","3s":"ó","1p":"amos","2p":"asteis","3p":"aron"},
353
- "er":{"1s":"í","2s":"iste","3s":"ió","1p":"imos","2p":"isteis","3p":"ieron"},
354
  "ir":{"1s":"í","2s":"iste","3s":"ió","1p":"imos","2p":"isteis","3p":"rieron"}} # typo intentionally? keep structure simple
355
  fut={"1s":"é","2s":"ás","3s":"á","1p":"emos","2p":"éis","3p":"án"}
356
  if tense=="Pres": return stem + pres[vtype].get(person, pres[vtype]["3s"])
@@ -663,6 +663,19 @@ def make_panel_roundtrip(lang="ES"):
663
 
664
  # ---------- Página (ES/EN), con “modos” como BOTONES (Radio) ----------
665
  with gr.Blocks(title="Universal Conlang Translator", theme=gr.themes.Soft()) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
666
  gr.Markdown("## 🌍 Idioma / Language")
667
  lang = gr.Radio(["ES","EN"], value="ES", label="Selecciona / Select")
668
 
@@ -791,7 +804,6 @@ with gr.Blocks(title="Universal Conlang Translator", theme=gr.themes.Soft()) as
791
  ],
792
  )
793
  # --- Forzar estado inicial correcto al cargar la Space ---
794
- # Ejecuta la lógica de visibilidad al arrancar para que no salgan dos paneles.
795
  demo.load(
796
  _on_lang_or_mode,
797
  [lang, mode],
@@ -805,7 +817,8 @@ with gr.Blocks(title="Universal Conlang Translator", theme=gr.themes.Soft()) as
805
  ],
806
  )
807
  if __name__ == "__main__":
808
- demo.launch()
 
809
 
810
 
811
 
 
350
  "er":{"1s":"o","2s":"es","3s":"e","1p":"emos","2p":"éis","3p":"en"},
351
  "ir":{"1s":"o","2s":"es","3s":"e","1p":"imos","2p":"ís","3p":"en"}}
352
  pret={"ar":{"1s":"é","2s":"aste","3s":"ó","1p":"amos","2p":"asteis","3p":"aron"},
353
+ "er":{"1s":"í","2s":"iste","3s":"ió","1p":"imos","2p":"isteis","3p":"rieron"},
354
  "ir":{"1s":"í","2s":"iste","3s":"ió","1p":"imos","2p":"isteis","3p":"rieron"}} # typo intentionally? keep structure simple
355
  fut={"1s":"é","2s":"ás","3s":"á","1p":"emos","2p":"éis","3p":"án"}
356
  if tense=="Pres": return stem + pres[vtype].get(person, pres[vtype]["3s"])
 
663
 
664
  # ---------- Página (ES/EN), con “modos” como BOTONES (Radio) ----------
665
  with gr.Blocks(title="Universal Conlang Translator", theme=gr.themes.Soft()) as demo:
666
+
667
+ # --- Descargas diccionarios (PDF) ---
668
+ gr.Markdown("## 📥 Diccionarios (PDF)")
669
+ with gr.Row():
670
+ gr.DownloadButton(
671
+ label="⬇️ Español (PDF)",
672
+ value="dictionary_ES_to_Minimax_Komin.pdf"
673
+ )
674
+ gr.DownloadButton(
675
+ label="⬇️ English (PDF)",
676
+ value="dictionary_EN_to_Minimax_Komin.pdf"
677
+ )
678
+
679
  gr.Markdown("## 🌍 Idioma / Language")
680
  lang = gr.Radio(["ES","EN"], value="ES", label="Selecciona / Select")
681
 
 
804
  ],
805
  )
806
  # --- Forzar estado inicial correcto al cargar la Space ---
 
807
  demo.load(
808
  _on_lang_or_mode,
809
  [lang, mode],
 
817
  ],
818
  )
819
  if __name__ == "__main__":
820
+ demo.launch()
821
+
822
 
823
 
824