stazizov commited on
Commit
7862da7
·
verified ·
1 Parent(s): eb8699a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -6,11 +6,12 @@ import spaces
6
  device = "cuda"
7
  model_id = "leks-forever/nllb-200-distilled-600M-v1"
8
 
 
 
 
9
  @spaces.GPU
10
  def translate(text, src_lang='lez_Cyrl', tgt_lang='rus_Cyrl', a=32, b=3, max_input_length=1024, num_beams=1, **kwargs):
11
-
12
- tokenizer = NllbTokenizer.from_pretrained(model_id)
13
- model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
14
  model = model.to(device)
15
 
16
  if src_lang in language_codes:
 
6
  device = "cuda"
7
  model_id = "leks-forever/nllb-200-distilled-600M-v1"
8
 
9
+ tokenizer = NllbTokenizer.from_pretrained(model_id)
10
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
11
+
12
  @spaces.GPU
13
  def translate(text, src_lang='lez_Cyrl', tgt_lang='rus_Cyrl', a=32, b=3, max_input_length=1024, num_beams=1, **kwargs):
14
+
 
 
15
  model = model.to(device)
16
 
17
  if src_lang in language_codes: