Demosthene-OR commited on
Commit
f2ce4b7
1 Parent(s): 5bd6b90
tabs/intro.py CHANGED
@@ -59,7 +59,7 @@ def run():
59
 
60
  Nous évaluerons la qualité de nos résultats en les comparant avec des systèmes performants tels que “[Google translate](https://translate.google.fr/)”
61
 
62
- Le projet est enregistré sur [Github](https://github.com/DataScientest-Studio/AVR23_CDS_Reco_vocale/tree/main)
63
 
64
  """
65
  )
 
59
 
60
  Nous évaluerons la qualité de nos résultats en les comparant avec des systèmes performants tels que “[Google translate](https://translate.google.fr/)”
61
 
62
+ Le projet est enregistré sur [Github](https://github.com/Demosthene-OR/AVR23_CDS_Text_translation)
63
 
64
  """
65
  )
tabs/modelisation_seq2seq_tab.py CHANGED
@@ -27,8 +27,6 @@ from extra_streamlit_components import tab_bar, TabBarItemData
27
  title = "Traduction Sequence à Sequence"
28
  sidebar_name = "Traduction Seq2Seq"
29
 
30
- # !pip install transformers
31
- # !pip install sentencepiece
32
 
33
  @st.cache_data
34
  def load_corpus(path):
@@ -50,6 +48,7 @@ def custom_standardization(input_string):
50
  return tf.strings.regex_replace(
51
  lowercase, f"[{re.escape(strip_chars)}]", "")
52
 
 
53
  def load_vocab(file_path):
54
  with open(file_path, "r", encoding="utf-8") as file:
55
  return file.read().split('\n')[:-1]
@@ -311,12 +310,12 @@ def find_lang_label(lang_sel):
311
 
312
  @st.cache_data
313
  def translate_examples():
314
- s = ["the alchemists wanted to transform the lead",
315
- "you are definitely a loser",
316
- "you fear to fail your exam",
317
  "I drive an old rusty car",
318
- "magic can make dreams come true!",
319
- "with magic, lead does not exist anymore",
320
  "The data science school students learn how to fine tune transformer models",
321
  "F1 is a very appreciated sport",
322
  ]
 
27
  title = "Traduction Sequence à Sequence"
28
  sidebar_name = "Traduction Seq2Seq"
29
 
 
 
30
 
31
  @st.cache_data
32
  def load_corpus(path):
 
48
  return tf.strings.regex_replace(
49
  lowercase, f"[{re.escape(strip_chars)}]", "")
50
 
51
+ @st.cache_data
52
  def load_vocab(file_path):
53
  with open(file_path, "r", encoding="utf-8") as file:
54
  return file.read().split('\n')[:-1]
 
310
 
311
  @st.cache_data
312
  def translate_examples():
313
+ s = ["The alchemists wanted to transform the lead",
314
+ "You are definitely a loser",
315
+ "You fear to fail your exam",
316
  "I drive an old rusty car",
317
+ "Magic can make dreams come true!",
318
+ "With magic, lead does not exist anymore",
319
  "The data science school students learn how to fine tune transformer models",
320
  "F1 is a very appreciated sport",
321
  ]