deepsync commited on
Commit
da3f641
·
verified ·
1 Parent(s): 058254a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -186,15 +186,15 @@ def claude_hindi_to_tamil(text):
186
  def render_translations(text):
187
  dubpro = dubpro_english_to_hindi(text)
188
  azure = azure_english_to_hindi(text)
189
- # gemini = gemini_english_to_hindi(text)
190
  gpt_4 = openai_english_to_hindi(text, model="gpt-4")
191
  # claude_haiku = claude_english_to_hindi(text)
192
- return gr.update(value=gpt_4), gr.update(value=dubpro), gr.update(value=azure)
193
 
194
 
195
  with gr.Blocks(title="English to Hindi Translation Tools", theme="gradio/monochrome") as demo:
196
  gr.Markdown("# English to Hindi Translation for Dubbing")
197
- input_textbox = gr.Textbox(label="Input Text", info="Text to translate", value="When you did it, you must have attended your classes well or you must have done your daily revision. Now you feel scared.")
198
  submit = gr.Button(label="Submit")
199
  with gr.Row():
200
  gr.Label(value="Dubpro's Model", scale=1)
@@ -202,9 +202,9 @@ with gr.Blocks(title="English to Hindi Translation Tools", theme="gradio/monochr
202
  with gr.Row():
203
  gr.Label(value="GPT 4", scale=1)
204
  gpt_4_textbox = gr.Textbox(label="Translated Text", scale=2, interactive=False)
205
- # with gr.Row():
206
- # gr.Label(value="Google Gemini", scale=1)
207
- # google_textbox = gr.Textbox(label="Translated Text", scale=2, interactive=False)
208
  # with gr.Row():
209
  # gr.Label(value="Anthropic Claude 3", scale=1)
210
  # claude_textbox = gr.Textbox(label="Translated Text", scale=2, interactive=False)
@@ -212,7 +212,7 @@ with gr.Blocks(title="English to Hindi Translation Tools", theme="gradio/monochr
212
  gr.Label(value="Azure Translate", scale=1)
213
  azure_textbox = gr.Textbox(label="Translated Text", scale=2, interactive=False)
214
 
215
- submit.click(render_translations, input_textbox, [gpt_4_textbox, dubpro_model_textbox, azure_textbox])
216
 
217
 
218
  if __name__=="__main__":
 
186
  def render_translations(text):
187
  dubpro = dubpro_english_to_hindi(text)
188
  azure = azure_english_to_hindi(text)
189
+ gemini = gemini_english_to_hindi(text)
190
  gpt_4 = openai_english_to_hindi(text, model="gpt-4")
191
  # claude_haiku = claude_english_to_hindi(text)
192
+ return gr.update(value=gpt_4), gr.update(value=dubpro), gr.update(value=gemini), gr.update(value=azure)
193
 
194
 
195
  with gr.Blocks(title="English to Hindi Translation Tools", theme="gradio/monochrome") as demo:
196
  gr.Markdown("# English to Hindi Translation for Dubbing")
197
+ input_textbox = gr.Textbox(label="Input Text", info="Text to translate", value="जब आपने यह किया, तो आपने अपनी कक्षाएं अच्छी तरह से अटेंड की होंगी या आपने अपना दैनिक रिवीजन किया होगा। अब तुम्हें डर लगने लगा है।")
198
  submit = gr.Button(label="Submit")
199
  with gr.Row():
200
  gr.Label(value="Dubpro's Model", scale=1)
 
202
  with gr.Row():
203
  gr.Label(value="GPT 4", scale=1)
204
  gpt_4_textbox = gr.Textbox(label="Translated Text", scale=2, interactive=False)
205
+ with gr.Row():
206
+ gr.Label(value="Google Gemini", scale=1)
207
+ google_textbox = gr.Textbox(label="Translated Text", scale=2, interactive=False)
208
  # with gr.Row():
209
  # gr.Label(value="Anthropic Claude 3", scale=1)
210
  # claude_textbox = gr.Textbox(label="Translated Text", scale=2, interactive=False)
 
212
  gr.Label(value="Azure Translate", scale=1)
213
  azure_textbox = gr.Textbox(label="Translated Text", scale=2, interactive=False)
214
 
215
+ submit.click(render_translations, input_textbox, [gpt_4_textbox, dubpro_model_textbox, google_textbox, azure_textbox])
216
 
217
 
218
  if __name__=="__main__":