Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -260,13 +260,7 @@ with gr.Blocks() as app:
|
|
| 260 |
with gr.Group(elem_id="group_all"):
|
| 261 |
with gr.Row():
|
| 262 |
start_image = gr.Image(type="pil", label="Start Frame")
|
| 263 |
-
|
| 264 |
-
with gr.Tabs(elem_id="group_tabs") as tabs:
|
| 265 |
-
with gr.TabItem("Upload", id="upload_tab"):
|
| 266 |
-
end_image = gr.Image(type="pil", label="End Frame")
|
| 267 |
-
with gr.TabItem("Generate", id="generate_tab"):
|
| 268 |
-
generate_5seconds = gr.Button("Generate scene 5 seconds in the future", elem_id="fivesec")
|
| 269 |
-
gr.Markdown("Generate a custom end-frame with an edit model like [Nano Banana](https://huggingface.co/spaces/multimodalart/nano-banana) or [Qwen Image Edit](https://huggingface.co/spaces/multimodalart/Qwen-Image-Edit-Fast)", elem_id="or_item")
|
| 270 |
prompt = gr.Textbox(label="Prompt", info="Describe the transition between the two images")
|
| 271 |
|
| 272 |
with gr.Accordion("Advanced Settings", open=False):
|
|
@@ -305,20 +299,6 @@ with gr.Blocks() as app:
|
|
| 305 |
outputs=ui_outputs
|
| 306 |
)
|
| 307 |
|
| 308 |
-
generate_5seconds.click(
|
| 309 |
-
fn=switch_to_upload_tab,
|
| 310 |
-
inputs=None,
|
| 311 |
-
outputs=[tabs]
|
| 312 |
-
).then(
|
| 313 |
-
fn=lambda img: generate_end_frame(img, "this image is a still frame from a movie. generate a new frame with what happens on this scene 5 seconds in the future"),
|
| 314 |
-
inputs=[start_image],
|
| 315 |
-
outputs=[end_image]
|
| 316 |
-
).success(
|
| 317 |
-
fn=generate_video,
|
| 318 |
-
inputs=ui_inputs,
|
| 319 |
-
outputs=ui_outputs
|
| 320 |
-
)
|
| 321 |
-
|
| 322 |
gr.Examples(
|
| 323 |
examples=[
|
| 324 |
["poli_tower.png", "tower_takes_off.png", "the man turns around"],
|
|
|
|
| 260 |
with gr.Group(elem_id="group_all"):
|
| 261 |
with gr.Row():
|
| 262 |
start_image = gr.Image(type="pil", label="Start Frame")
|
| 263 |
+
end_image = gr.Image(type="pil", label="End Frame")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
prompt = gr.Textbox(label="Prompt", info="Describe the transition between the two images")
|
| 265 |
|
| 266 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
|
| 299 |
outputs=ui_outputs
|
| 300 |
)
|
| 301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
gr.Examples(
|
| 303 |
examples=[
|
| 304 |
["poli_tower.png", "tower_takes_off.png", "the man turns around"],
|