ChiranthanCV commited on
Commit
3fbca17
·
verified ·
1 Parent(s): 81087c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -6,15 +6,16 @@ import torch
6
  # model="Salesforce/blip-image-captioning-base")
7
 
8
  pipe = pipeline(task="translation",
9
- model="./models/facebook/nllb-200-distilled-600M",
10
  torch_dtype=torch.bfloat16)
11
 
12
- text_translated = pipe(text,
13
- src_lang="eng_Latn",
14
- tgt_lang="fra_Latn")
15
 
16
  def launch(input):
17
- out = pipe(input)
 
18
  return out[0]['generated_text']
19
 
20
  iface = gr.Interface(launch,
 
6
  # model="Salesforce/blip-image-captioning-base")
7
 
8
  pipe = pipeline(task="translation",
9
+ model="facebook/nllb-200-distilled-600M",
10
  torch_dtype=torch.bfloat16)
11
 
12
+ # text_translated = pipe(text,
13
+ # src_lang="eng_Latn",
14
+ # tgt_lang="fra_Latn")
15
 
16
  def launch(input):
17
+ out = pipe(input, src_lang="eng_Latn",
18
+ tgt_lang="fra_Latn")
19
  return out[0]['generated_text']
20
 
21
  iface = gr.Interface(launch,