ilhamsyahids commited on
Commit
b601f49
1 Parent(s): c9328c0

add nllb-600m and the example

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -7,7 +7,7 @@ from flores200_codes import flores_codes
7
  def load_models():
8
  # build model and tokenizer
9
  model_name_dict = {
10
- # "nllb-distilled-600M": "facebook/nllb-200-distilled-600M",
11
  "nllb-distilled-1.3B": "facebook/nllb-200-distilled-1.3B",
12
  # "nllb-1.3B": "facebook/nllb-200-1.3B",
13
  # "nllb-3.3B": "facebook/nllb-200-3.3B",
@@ -68,7 +68,7 @@ if __name__ == "__main__":
68
  inputs = [
69
  gr.inputs.Radio(
70
  [
71
- # "nllb-distilled-600M",
72
  "nllb-distilled-1.3B",
73
  # "nllb-1.3B",
74
  # "nllb-3.3B"
@@ -87,7 +87,10 @@ if __name__ == "__main__":
87
 
88
  demo_status = "Demo is running on CPU"
89
  description = f"Using NLLB model, details: https://github.com/facebookresearch/fairseq/tree/nllb. {demo_status}"
90
- examples = [["nllb-distilled-1.3B", "Najdi Arabic", "English", "جلست اطفال"]]
 
 
 
91
 
92
  gr.Interface(
93
  translation,
 
7
  def load_models():
8
  # build model and tokenizer
9
  model_name_dict = {
10
+ "nllb-distilled-600M": "facebook/nllb-200-distilled-600M",
11
  "nllb-distilled-1.3B": "facebook/nllb-200-distilled-1.3B",
12
  # "nllb-1.3B": "facebook/nllb-200-1.3B",
13
  # "nllb-3.3B": "facebook/nllb-200-3.3B",
 
68
  inputs = [
69
  gr.inputs.Radio(
70
  [
71
+ "nllb-distilled-600M",
72
  "nllb-distilled-1.3B",
73
  # "nllb-1.3B",
74
  # "nllb-3.3B"
 
87
 
88
  demo_status = "Demo is running on CPU"
89
  description = f"Using NLLB model, details: https://github.com/facebookresearch/fairseq/tree/nllb. {demo_status}"
90
+ examples = [
91
+ ["nllb-distilled-1.3B", "Najdi Arabic", "English", "جلست اطفال"],
92
+ ["nllb-distilled-600M", "Najdi Arabic", "English", "شد للبيع طابقين مع شرع له نظيف حق غمارتين"]
93
+ ]
94
 
95
  gr.Interface(
96
  translation,