vitaliy-sharandin commited on
Commit
157733b
1 Parent(s): c981ef0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -325,9 +325,9 @@ css = """
325
  }
326
  """
327
 
 
 
328
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
329
-
330
- initial_usage_info = translation_limit()
331
 
332
  gr.Markdown("<h1 style='text-align: center;'>🌐AI Video Translation</h2>")
333
  gr.Markdown("<h3 style='text-align: center;'>Currently supported languages are: English, Polish, Ukrainian, and Russian</h3>")
@@ -335,7 +335,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
335
  with gr.Row():
336
  with gr.Column(elem_classes=["column-frame"]):
337
  gr.Markdown("<h2 style='text-align: center;'>Inputs</h3>")
338
- translation_limit_info = gr.Markdown(initial_usage_info)
339
  video = gr.Video(label="Upload a video file")
340
  gr.Markdown("<h3 style='text-align: center;'>OR</h3>")
341
  youtube_link = gr.Textbox(label="Paste YouTube link")
@@ -355,7 +355,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
355
  translate_btn.click(
356
  fn=translate_video,
357
  inputs=[video, youtube_link, target_language, speaker_model],
358
- outputs=[translation_limit_info, output_video]
359
  )
360
 
361
  clear_btn.click(
 
325
  }
326
  """
327
 
328
+ initial_usage_info = translation_limit()
329
+
330
  with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
 
 
331
 
332
  gr.Markdown("<h1 style='text-align: center;'>🌐AI Video Translation</h2>")
333
  gr.Markdown("<h3 style='text-align: center;'>Currently supported languages are: English, Polish, Ukrainian, and Russian</h3>")
 
335
  with gr.Row():
336
  with gr.Column(elem_classes=["column-frame"]):
337
  gr.Markdown("<h2 style='text-align: center;'>Inputs</h3>")
338
+ limit_info = gr.Markdown(initial_usage_info)
339
  video = gr.Video(label="Upload a video file")
340
  gr.Markdown("<h3 style='text-align: center;'>OR</h3>")
341
  youtube_link = gr.Textbox(label="Paste YouTube link")
 
355
  translate_btn.click(
356
  fn=translate_video,
357
  inputs=[video, youtube_link, target_language, speaker_model],
358
+ outputs=[limit_info, output_video]
359
  )
360
 
361
  clear_btn.click(