Svngoku commited on
Commit
59288b1
1 Parent(s): 3ae7a3c

Update the model enpoint

Browse files
Files changed (1) hide show
  1. app.py +3 -11
app.py CHANGED
@@ -8,8 +8,8 @@ from flores200_codes import flores_codes
8
 
9
  def load_models():
10
  # build model and tokenizer
11
- model_name_dict = {'nllb-distilled-600M': 'facebook/nllb-200-distilled-600M',
12
- #'nllb-1.3B': 'facebook/nllb-200-1.3B',
13
  #'nllb-distilled-1.3B': 'facebook/nllb-200-distilled-1.3B',
14
  #'nllb-3.3B': 'facebook/nllb-200-3.3B',
15
  }
@@ -26,14 +26,6 @@ def load_models():
26
  return model_dict
27
 
28
 
29
- import os
30
- import torch
31
- import gradio as gr
32
- import time
33
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
34
- from flores200_codes import flores_codes
35
-
36
-
37
  def load_models():
38
  # build model and tokenizer
39
  model_name_dict = {'nllb-distilled-600M': 'facebook/nllb-200-distilled-600M',
@@ -96,7 +88,7 @@ if __name__ == '__main__':
96
 
97
  outputs = gr.outputs.JSON()
98
 
99
- title = "NLLB distilled 600M demo"
100
 
101
  demo_status = "Demo is running on CPU"
102
  description = f"Details: https://github.com/facebookresearch/fairseq/tree/nllb. {demo_status}"
 
8
 
9
  def load_models():
10
  # build model and tokenizer
11
+ model_name_dict = {#'nllb-distilled-600M': 'facebook/nllb-200-distilled-600M',
12
+ 'nllb-1.3B': 'facebook/nllb-200-1.3B',
13
  #'nllb-distilled-1.3B': 'facebook/nllb-200-distilled-1.3B',
14
  #'nllb-3.3B': 'facebook/nllb-200-3.3B',
15
  }
 
26
  return model_dict
27
 
28
 
 
 
 
 
 
 
 
 
29
  def load_models():
30
  # build model and tokenizer
31
  model_name_dict = {'nllb-distilled-600M': 'facebook/nllb-200-distilled-600M',
 
88
 
89
  outputs = gr.outputs.JSON()
90
 
91
+ title = "NLLB distilled 1.3B demo"
92
 
93
  demo_status = "Demo is running on CPU"
94
  description = f"Details: https://github.com/facebookresearch/fairseq/tree/nllb. {demo_status}"