sheikhed commited on
Commit
bda2d20
·
verified ·
1 Parent(s): 2efc853

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -13
app.py CHANGED
@@ -180,23 +180,13 @@ def create_interface():
180
  video_url_input = gr.Textbox(label="Enter Video URL")
181
  text_input = gr.Textbox(label="Enter text", lines=3)
182
  generate_btn = gr.Button("Generate Video")
183
- with gr.Column():
184
- video_output = gr.Video(label="Generated Video")
185
- status_output = gr.Textbox(label="Status", interactive=False)
186
-
187
- async def on_generate(voice_name, video_url, text):
188
- return await process_video(voice_name, video_url, text)
189
-
190
  generate_btn.click(
191
  fn=on_generate,
192
  inputs=[voice_dropdown, video_url_input, text_input],
193
- outputs=[video_output, status_output],
194
- api_name="generate" # This allows the function to be called via API
195
- )
196
-
197
- return app
198
 
199
  if __name__ == "__main__":
200
  app = create_interface()
201
- app.queue(concurrency_count=5, max_size=20) # Allow up to 5 concurrent tasks, queue up to 20
202
  app.launch()
 
180
  video_url_input = gr.Textbox(label="Enter Video URL")
181
  text_input = gr.Textbox(label="Enter text", lines=3)
182
  generate_btn = gr.Button("Generate Video")
183
+ return None, "Invalid voice selected."
184
+ return await process_video(voice_id, video_url, text)
185
+
 
 
 
 
186
  generate_btn.click(
187
  fn=on_generate,
188
  inputs=[voice_dropdown, video_url_input, text_input],
 
 
 
 
 
189
 
190
  if __name__ == "__main__":
191
  app = create_interface()
 
192
  app.launch()