himanishprak23 commited on
Commit
e9a2b73
1 Parent(s): 014f2b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -94,8 +94,15 @@ def translate_text(input_text):
94
  translation_nmt_base = translate_text_base_nmt(input_text)
95
  translation_nmt_finetuned = translate_text_nmt(input_text)
96
  return translation_lstm, translation_nmt_base, translation_nmt_finetuned
 
 
 
 
 
 
 
 
97
 
98
- # Create the Gradio interface
99
  iface = gr.Interface(
100
  fn=translate_text,
101
  inputs=gr.components.Textbox(lines=2, placeholder="Enter text to translate from English to Hindi..."),
@@ -105,7 +112,8 @@ iface = gr.Interface(
105
  gr.components.Textbox(label="Translation (Fine-tuned Helsinki Model)")
106
  ],
107
  title="English to Hindi Translator",
108
- description="Enter English text and get the Hindi translation from three different models: LSTM, Base Helsinki-NLP, and Fine-tuned Helsinki-NLP."
 
109
  )
110
 
111
  # Launch the Gradio app
 
94
  translation_nmt_base = translate_text_base_nmt(input_text)
95
  translation_nmt_finetuned = translate_text_nmt(input_text)
96
  return translation_lstm, translation_nmt_base, translation_nmt_finetuned
97
+ examples = [
98
+ ["Microservices Architecture: Containers are ideal for deploying microservices, as each service can run in its own container and be independently managed."],
99
+ ["Kubernetes: An open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications."],
100
+ ["Machine Learning: The practice of using algorithms to parse data, learn from it, and then make a determination or prediction about something in the world."],
101
+ ["Data Science: An interdisciplinary field that uses scientific methods, processes, algorithms, and systems to extract knowledge and insights from noisy, structured, and unstructured data."],
102
+ ["DevOps: A set of practices that combines software development and IT operations to shorten the development lifecycle and deliver high-quality software continuously."]
103
+
104
+ ]
105
 
 
106
  iface = gr.Interface(
107
  fn=translate_text,
108
  inputs=gr.components.Textbox(lines=2, placeholder="Enter text to translate from English to Hindi..."),
 
112
  gr.components.Textbox(label="Translation (Fine-tuned Helsinki Model)")
113
  ],
114
  title="English to Hindi Translator",
115
+ description="Enter English text and get the Hindi translation from three different models: LSTM, Base Helsinki-NLP, and Fine-tuned Helsinki-NLP. LSTM models both have a single hidden layer trained for 50 epochs, the GPT-2 has been trained for 5 epochs",
116
+ examples=examples
117
  )
118
 
119
  # Launch the Gradio app