Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,7 +93,7 @@ def generate_video(prompt, seed, image, task_type, predictor): # predictor as ar
|
|
| 93 |
video_out_file = f"{save_dir}/{prompt[:100]}_{int(seed)}.mp4"
|
| 94 |
print(f"Generating video: {video_out_file}")
|
| 95 |
export_to_video(frames, video_out_file, fps=24)
|
| 96 |
-
return video_out_file
|
| 97 |
|
| 98 |
except Exception as e:
|
| 99 |
return f"Error: {e}", "{}"
|
|
@@ -114,7 +114,6 @@ with gr.Blocks() as demo:
|
|
| 114 |
submit_button = gr.Button("Generate", elem_id="submit_button")
|
| 115 |
with gr.Column():
|
| 116 |
output_video = gr.Video(label="Video", elem_id="output_video")
|
| 117 |
-
output_params = gr.Textbox(label="Params", elem_id="output_params")
|
| 118 |
|
| 119 |
load_model_button.click(
|
| 120 |
fn=init_predictor,
|
|
@@ -125,7 +124,7 @@ with gr.Blocks() as demo:
|
|
| 125 |
submit_button.click(
|
| 126 |
fn=generate_video,
|
| 127 |
inputs=[prompt, seed, image, task_type_dropdown, predictor_state],
|
| 128 |
-
outputs=[output_video
|
| 129 |
)
|
| 130 |
|
| 131 |
demo.launch()
|
|
|
|
| 93 |
video_out_file = f"{save_dir}/{prompt[:100]}_{int(seed)}.mp4"
|
| 94 |
print(f"Generating video: {video_out_file}")
|
| 95 |
export_to_video(frames, video_out_file, fps=24)
|
| 96 |
+
return video_out_file
|
| 97 |
|
| 98 |
except Exception as e:
|
| 99 |
return f"Error: {e}", "{}"
|
|
|
|
| 114 |
submit_button = gr.Button("Generate", elem_id="submit_button")
|
| 115 |
with gr.Column():
|
| 116 |
output_video = gr.Video(label="Video", elem_id="output_video")
|
|
|
|
| 117 |
|
| 118 |
load_model_button.click(
|
| 119 |
fn=init_predictor,
|
|
|
|
| 124 |
submit_button.click(
|
| 125 |
fn=generate_video,
|
| 126 |
inputs=[prompt, seed, image, task_type_dropdown, predictor_state],
|
| 127 |
+
outputs=[output_video],
|
| 128 |
)
|
| 129 |
|
| 130 |
demo.launch()
|