LovnishVerma commited on
Commit
47f249d
1 Parent(s): 1cfed45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from transformers import MarianMTModel, MarianTokenizer
3
 
4
  # Load pre-trained MarianMT model and tokenizer for translation
5
- model_name = "Helsinki-NLP/opus-mt-en-de"
6
  model = MarianMTModel.from_pretrained(model_name)
7
  tokenizer = MarianTokenizer.from_pretrained(model_name)
8
 
@@ -25,10 +25,9 @@ iface = gr.Interface(
25
  inputs=gr.Textbox(),
26
  outputs=gr.Textbox(),
27
  live=True,
28
- title="Language Translation App",
29
- description="Translate text from English to German using MarianMT.",
30
  )
31
 
32
  # Launch the Gradio app
33
  iface.launch()
34
-
 
2
  from transformers import MarianMTModel, MarianTokenizer
3
 
4
  # Load pre-trained MarianMT model and tokenizer for translation
5
+ model_name = "Helsinki-NLP/opus-mt-en-hi"
6
  model = MarianMTModel.from_pretrained(model_name)
7
  tokenizer = MarianTokenizer.from_pretrained(model_name)
8
 
 
25
  inputs=gr.Textbox(),
26
  outputs=gr.Textbox(),
27
  live=True,
28
+ title="English to Hindi Translation App",
29
+ description="Translate text from English to Hindi using MarianMT.",
30
  )
31
 
32
  # Launch the Gradio app
33
  iface.launch()