vertigo23 commited on
Commit
c4d755b
·
1 Parent(s): 18f70f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -28,13 +28,15 @@ prefix = "translate Luganda to English: "
28
  def translate_lg_to_en(text):
29
  lg_input = prefix + text
30
  translated_text = translator(lg_input)
31
- return translated_text[0]['translation_text']
 
 
32
 
33
  # Gradio interface
34
  gr.Interface(
35
  fn=translate_lg_to_en,
36
  inputs=gr.Text(),
37
- outputs=gr.Textbox(label="English Translation"),
38
  title="Njogerera Translation App",
39
  description="Type in a Luganda sentence and see the translation.",
40
  article="Above is some sample text to test the results of the model. Click to see the results.",
 
28
  def translate_lg_to_en(text):
29
  lg_input = prefix + text
30
  translated_text = translator(lg_input)
31
+ english_translation = translated_text[0]['translation_text']
32
+ ksl_path = "KSL/abandon.mp4"
33
+ return english_translation, ksl_path
34
 
35
  # Gradio interface
36
  gr.Interface(
37
  fn=translate_lg_to_en,
38
  inputs=gr.Text(),
39
+ outputs=[gr.Textbox(label="English Translation"), gr.Video(label="KSL Sign Language Animation")],
40
  title="Njogerera Translation App",
41
  description="Type in a Luganda sentence and see the translation.",
42
  article="Above is some sample text to test the results of the model. Click to see the results.",