Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -249,20 +249,24 @@ with gr.Blocks(css=CSS, title="StitchMaster") as demo:
|
|
| 249 |
# Seed + Start/End selection + Prompt + Stitch + Preview
|
| 250 |
seed = gr.Number(value=0, precision=0, label="Seed (0 = random)")
|
| 251 |
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 266 |
# keep start/end dropdowns up to date based on which slots have images
|
| 267 |
for comp in img_comps:
|
| 268 |
comp.change(
|
|
@@ -302,4 +306,4 @@ with gr.Blocks(css=CSS, title="StitchMaster") as demo:
|
|
| 302 |
)
|
| 303 |
|
| 304 |
if __name__ == "__main__":
|
| 305 |
-
demo.queue().launch()
|
|
|
|
| 249 |
# Seed + Start/End selection + Prompt + Stitch + Preview
|
| 250 |
seed = gr.Number(value=0, precision=0, label="Seed (0 = random)")
|
| 251 |
|
| 252 |
+
with gr.Row():
|
| 253 |
+
# Left column: controls (with colored background via .stitch-box)
|
| 254 |
+
with gr.Column(scale=1, min_width=420, elem_classes=["stitch-box"]):
|
| 255 |
+
start_dd = gr.Dropdown(label="Start frame", choices=[], interactive=True)
|
| 256 |
+
end_dd = gr.Dropdown(label="End frame", choices=[], interactive=True)
|
| 257 |
+
prompt = gr.Textbox(
|
| 258 |
+
placeholder="Describe the transition between the selected start and end frames…",
|
| 259 |
+
lines=3,
|
| 260 |
+
label="Prompt",
|
| 261 |
+
elem_classes=["rounded"]
|
| 262 |
+
)
|
| 263 |
+
run_btn = gr.Button("Generate", elem_classes=["pill"])
|
| 264 |
+
add_tl_btn = gr.Button("Add to timeline", elem_classes=["pill"])
|
| 265 |
+
|
| 266 |
+
# Right column: preview video
|
| 267 |
+
with gr.Column(scale=1, min_width=420):
|
| 268 |
+
preview = gr.Video(label="Video output", interactive=False)
|
| 269 |
+
|
| 270 |
# keep start/end dropdowns up to date based on which slots have images
|
| 271 |
for comp in img_comps:
|
| 272 |
comp.change(
|
|
|
|
| 306 |
)
|
| 307 |
|
| 308 |
if __name__ == "__main__":
|
| 309 |
+
demo.queue().launch()
|