guymorlan commited on
Commit
2e03cd0
1 Parent(s): 09e0776

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -223,7 +223,7 @@ with gr.Blocks(title = "Levantine Arabic Translator", css=css, theme="default")
223
  with gr.Row():
224
  include = gr.CheckboxGroup(["Translit.", "SYR", "LEB", "EGY", "Colorize"],
225
  label="Disable features to speed up translation",
226
- value=["Translit.", "Egyptian", "Colorize"])
227
  gr.Markdown("Built by [Guy Mor-Lan](mailto:[email protected]). Pronunciation model is specifically tailored to urban Palestinian Arabic. Text-to-speech uses Microsoft Azure's API and may provide different result from the transliterated pronunciation.")
228
 
229
  with gr.Column():
@@ -236,10 +236,10 @@ with gr.Blocks(title = "Levantine Arabic Translator", css=css, theme="default")
236
  sy = gr.Textbox(lines=1, label="Syrian", elem_id="trans", visible=False)
237
  lb = gr.Textbox(lines=1, label="Lebanese", elem_id="trans", visible=False)
238
  eg = gr.Textbox(lines=1, label="Egyptian", elem_id="trans")
239
- with gr.Row():
240
- audio = gr.Audio(label="Audio - Palestinian", interactive=False)
241
- audio_button = gr.Button("Get Audio", label="Click Here to Get Audio")
242
- audio_button.click(get_audio, inputs=[pal], outputs=[audio])
243
  btn.click(translate_english,inputs=[input_text, include], outputs=[pal_html, pal, sy, lb, eg], _js="function jump(x, y){document.getElementById('main').scrollIntoView(); return [x, y];}")
244
  input_text.submit(translate_english, inputs=[input_text, include], outputs=[pal_html, pal, sy, lb, eg],scroll_to_output=True)
245
  pal.change(get_transliteration, inputs=[pal, include], outputs=[pal_translit]);
@@ -266,5 +266,4 @@ with gr.Blocks(title = "Levantine Arabic Translator", css=css, theme="default")
266
  btn.click(get_transliteration, inputs=input_text, outputs=[translit])
267
 
268
 
269
- demo.launch()
270
-
 
223
  with gr.Row():
224
  include = gr.CheckboxGroup(["Translit.", "SYR", "LEB", "EGY", "Colorize"],
225
  label="Disable features to speed up translation",
226
+ value=["Translit.", "EGY", "Colorize"])
227
  gr.Markdown("Built by [Guy Mor-Lan](mailto:[email protected]). Pronunciation model is specifically tailored to urban Palestinian Arabic. Text-to-speech uses Microsoft Azure's API and may provide different result from the transliterated pronunciation.")
228
 
229
  with gr.Column():
 
236
  sy = gr.Textbox(lines=1, label="Syrian", elem_id="trans", visible=False)
237
  lb = gr.Textbox(lines=1, label="Lebanese", elem_id="trans", visible=False)
238
  eg = gr.Textbox(lines=1, label="Egyptian", elem_id="trans")
239
+ # with gr.Row():
240
+ audio = gr.Audio(label="Audio - Palestinian", interactive=False)
241
+ audio_button = gr.Button("Get Audio", label="Click Here to Get Audio")
242
+ audio_button.click(get_audio, inputs=[pal], outputs=[audio])
243
  btn.click(translate_english,inputs=[input_text, include], outputs=[pal_html, pal, sy, lb, eg], _js="function jump(x, y){document.getElementById('main').scrollIntoView(); return [x, y];}")
244
  input_text.submit(translate_english, inputs=[input_text, include], outputs=[pal_html, pal, sy, lb, eg],scroll_to_output=True)
245
  pal.change(get_transliteration, inputs=[pal, include], outputs=[pal_translit]);
 
266
  btn.click(get_transliteration, inputs=input_text, outputs=[translit])
267
 
268
 
269
+ demo.launch()