cointegrated commited on
Commit
3c7eb3b
1 Parent(s): 928013e

more renames

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. README.md +4 -4
  3. app.py +5 -6
.gitignore CHANGED
@@ -1 +1,2 @@
1
  .idea
 
 
1
  .idea
2
+ __pycache__
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
- title: Nllb Rus Tyv V1 Demo
3
- emoji: 🚀
4
- colorFrom: blue
5
- colorTo: gray
6
  sdk: gradio
7
  sdk_version: 3.46.1
8
  app_file: app.py
 
1
  ---
2
+ title: NLLB Erzya translation demo
3
+ emoji: 🦊
4
+ colorFrom: yellow
5
+ colorTo: red
6
  sdk: gradio
7
  sdk_version: 3.46.1
8
  app_file: app.py
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
 
3
 
4
- from translation import Translator, LANGUAGES
5
  LANGUAGES_LIST = list(LANGUAGES.keys())
6
 
7
 
@@ -22,11 +22,10 @@ def translate_wrapper(text, src, trg, by_sentence=True, preprocess=True, random=
22
  return result
23
 
24
 
25
- article = """
26
- This is a NLLB-200-600M model fine-tuned for translation between Russian and Tyvan (Tuvan) languages,
27
- using the data from https://tyvan.ru/.
28
 
29
- This model is described in https://cointegrated.medium.com/a37fc706b865.
30
 
31
  If you want to host in on your own backend, consider running this dockerized app: https://github.com/slone-nlp/nllb-docker-demo.
32
  """
@@ -44,7 +43,7 @@ interface = gr.Interface(
44
  gr.Dropdown([1, 2, 3, 4, 5], label="number of beams", value=4),
45
  ],
46
  "text",
47
- title='Tyvan-Russian translaton',
48
  article=article,
49
  )
50
 
 
1
  import gradio as gr
2
 
3
 
4
+ from translation import Translator, LANGUAGES, MODEL_URL
5
  LANGUAGES_LIST = list(LANGUAGES.keys())
6
 
7
 
 
22
  return result
23
 
24
 
25
+ article = f"""
26
+ This is the demo for a NLLB-200-600M model fine-tuned for translation between Russian and Erzya languages.
 
27
 
28
+ The model itself is available at https://huggingface.co/{MODEL_URL}
29
 
30
  If you want to host in on your own backend, consider running this dockerized app: https://github.com/slone-nlp/nllb-docker-demo.
31
  """
 
43
  gr.Dropdown([1, 2, 3, 4, 5], label="number of beams", value=4),
44
  ],
45
  "text",
46
+ title='Erzya-Russian translation',
47
  article=article,
48
  )
49