LittleLirow commited on
Commit
27938b7
1 Parent(s): fe7644e
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -14,10 +14,7 @@ def generate_video(text, auth_openai, auth_elevenlabs, auth_replicate, auth_rev)
14
  # generated_music = bgm.text2audio(text=text, duration=20, guidance_scale=5, random_seed=24, n_candidates=3)
15
 
16
  generated_video = join.join_artifacts()
17
- return generated_video
18
-
19
- def download_video(video_path):
20
- return video_path
21
 
22
  with gr.Blocks() as demo:
23
  gr.Markdown("Generate a narrated horror story video from a text prompt.")
@@ -33,12 +30,10 @@ with gr.Blocks() as demo:
33
  generate_button = gr.Button("Generate Video")
34
 
35
  with gr.Column():
36
- video_out = gr.Video(label="Output", interactive=False)
37
- download_button = gr.Button("Download")
38
- output_file = gr.outputs.File(label="Video Output")
39
  output_file.type = "video/mp4"
40
 
41
- generate_button.click(generate_video, inputs=[prompt_input, auth_openai_input, auth_eleven_input, auth_replicate_input, auth_rev_input], outputs=[video_out])
42
- download_button.click(download_video, inputs=[video_out], outputs=[output_file])
43
 
44
  demo.launch(debug=True, enable_queue=True)
 
14
  # generated_music = bgm.text2audio(text=text, duration=20, guidance_scale=5, random_seed=24, n_candidates=3)
15
 
16
  generated_video = join.join_artifacts()
17
+ return [generated_video, generated_video]
 
 
 
18
 
19
  with gr.Blocks() as demo:
20
  gr.Markdown("Generate a narrated horror story video from a text prompt.")
 
30
  generate_button = gr.Button("Generate Video")
31
 
32
  with gr.Column():
33
+ video_out = gr.Video(label="Video Player", interactive=False)
34
+ output_file = gr.outputs.File(label="File Output")
 
35
  output_file.type = "video/mp4"
36
 
37
+ generate_button.click(generate_video, inputs=[prompt_input, auth_openai_input, auth_eleven_input, auth_replicate_input, auth_rev_input], outputs=[video_out, output_file])
 
38
 
39
  demo.launch(debug=True, enable_queue=True)