rick commited on
Commit
ca3b8be
·
unverified ·
1 Parent(s): 1e92cce

update the UI

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -22,6 +22,17 @@ from audiorecorder import audiorecorder
22
  from openai import OpenAI
23
  from pydub import AudioSegment
24
 
 
 
 
 
 
 
 
 
 
 
 
25
  def load_ui_language(file_path: Optional[str] = "ui_lang_support.json") -> Dict[str, Any]:
26
  """
27
  Charge les traductions de l'interface utilisateur à partir d'un fichier JSON.
@@ -562,7 +573,7 @@ def main():
562
  nom_fichier = f"reponse_audio_{langues}_{timestamp}.mp3"
563
 
564
  st.download_button(
565
- label=get_translation("telecharger_audio"),
566
  data=final_audio,
567
  file_name=nom_fichier,
568
  mime="audio/mp3",
@@ -624,7 +635,7 @@ def main():
624
  st.audio(final_audio, format="audio/mp3", autoplay=True)
625
  # Ajout d'un bouton de téléchargement pour l'audio final
626
  st.download_button(
627
- label=get_translation("telecharger_audio"),
628
  data=final_audio,
629
  file_name="audio_concatene.mp3",
630
  mime="audio/mp3"
@@ -657,7 +668,7 @@ def main():
657
 
658
  with st.container(border=True):
659
  # Conteneur pour la sélection de langue
660
- st.subheader(get_translation("selection_langue"))
661
 
662
  # Sélection multiple des langues de destination
663
  st.multiselect(
@@ -671,7 +682,7 @@ def main():
671
  )
672
 
673
  with st.container(border=True):
674
- st.subheader(get_translation("parametres_tts"))
675
  st.selectbox(
676
  get_translation("choix_voix_tts"),
677
  options=["alloy", "echo", "fable", "onyx", "nova", "shimmer"],
 
22
  from openai import OpenAI
23
  from pydub import AudioSegment
24
 
25
+
26
+ __version__ = "v1.1.0"
27
+
28
+ # Au début du fichier, après les imports
29
+ st.set_page_config(
30
+ page_title=f"DEMORRHA - ({__version__})",
31
+ page_icon="👹",
32
+ layout="wide",
33
+ initial_sidebar_state="collapsed"
34
+ )
35
+
36
  def load_ui_language(file_path: Optional[str] = "ui_lang_support.json") -> Dict[str, Any]:
37
  """
38
  Charge les traductions de l'interface utilisateur à partir d'un fichier JSON.
 
573
  nom_fichier = f"reponse_audio_{langues}_{timestamp}.mp3"
574
 
575
  st.download_button(
576
+ label=f"📥 {get_translation('telecharger_audio')}",
577
  data=final_audio,
578
  file_name=nom_fichier,
579
  mime="audio/mp3",
 
635
  st.audio(final_audio, format="audio/mp3", autoplay=True)
636
  # Ajout d'un bouton de téléchargement pour l'audio final
637
  st.download_button(
638
+ label=f"📥 {get_translation('telecharger_audio')}",
639
  data=final_audio,
640
  file_name="audio_concatene.mp3",
641
  mime="audio/mp3"
 
668
 
669
  with st.container(border=True):
670
  # Conteneur pour la sélection de langue
671
+ st.markdown(f"## 🌐 {get_translation('selection_langue')}")
672
 
673
  # Sélection multiple des langues de destination
674
  st.multiselect(
 
682
  )
683
 
684
  with st.container(border=True):
685
+ st.markdown(f"## 🔊 {get_translation('parametres_tts')}")
686
  st.selectbox(
687
  get_translation("choix_voix_tts"),
688
  options=["alloy", "echo", "fable", "onyx", "nova", "shimmer"],