KarmaCST commited on
Commit
27d83bb
1 Parent(s): 4cf2366

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -2,12 +2,13 @@ import gradio as gr
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
3
  import torch
4
 
5
- model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M")
6
- tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M")
7
 
8
 
9
- src_lang = 'eng_Latn'
10
- tgt_lang = "dzo_Tibt"
 
11
 
12
  def translate(text):
13
  translation_pipeline = pipeline("translation",
@@ -23,7 +24,7 @@ def translate(text):
23
  gr.Interface(
24
  translate,
25
  [
26
- gr.components.Textbox(label="Input Sentence", placeholder = " Enter English sentence here ...")
27
  ],
28
  ["text"],
29
  ).launch()
 
2
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
3
  import torch
4
 
5
+ model = AutoModelForSeq2SeqLM.from_pretrained("KarmaCST/nllb-200-distilled-600M-dz-to-en")
6
+ tokenizer = AutoTokenizer.from_pretrained("KarmaCST/nllb-200-distilled-600M-dz-to-en")
7
 
8
 
9
+ src_lang = 'dzo_Tibt'
10
+ tgt_lang = "eng_Latn"
11
+
12
 
13
  def translate(text):
14
  translation_pipeline = pipeline("translation",
 
24
  gr.Interface(
25
  translate,
26
  [
27
+ gr.components.Textbox(label="Input Sentence", placeholder = " Enter Dzongkha sentence here ...")
28
  ],
29
  ["text"],
30
  ).launch()