Shalmoni commited on
Commit
45d70a6
·
verified ·
1 Parent(s): 09bc6f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -15
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
- with gr.Row():
253
- with gr.Column(scale=1, min_width=420, elem_classes=["stitch-box"]):
254
- start_dd = gr.Dropdown(label="Start frame", choices=[], interactive=True)
255
- end_dd = gr.Dropdown(label="End frame", choices=[], interactive=True)
256
- prompt = gr.Textbox(
257
- placeholder="Describe the transition between the selected start and end frames…",
258
- lines=3, label="Prompt", elem_classes=["rounded"]
259
- )
260
- run_btn = gr.Button("Generate", elem_classes=["pill"])
261
- add_tl_btn = gr.Button("Add to timeline", elem_classes=["pill"])
262
-
263
- with gr.Column(scale=1, min_width=420):
264
- preview = gr.Video(label="Video output", interactive=False)
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()