omer11a commited on
Commit
97abb9e
1 Parent(s): 0ea3f87

Fixed some stuff

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -298,6 +298,7 @@ def draw(sketchpad):
298
 
299
  boxes.append((x1, y1, x2, y2))
300
 
 
301
  layout_image = draw_boxes(boxes)
302
  return [boxes, layout_image]
303
 
@@ -322,6 +323,7 @@ def clear(batch_size):
322
 
323
  def build_example_layout(prompt, *args):
324
  boxes = EXAMPLE_BOXES[prompt]
 
325
 
326
  composite = draw_boxes(boxes, is_sketch=True)
327
  sketchpad = {"background": None, "layers": [], "composite": composite}
@@ -352,11 +354,13 @@ def main():
352
  label="Text prompt",
353
  placeholder=PROMPT1,
354
  )
 
355
  subject_sub_prompts = gr.Textbox(
356
- label="Sub-prompts for each subject (separate with semicolons)",
357
- placeholder=SUBJECT_SUB_PROMPTS1,
358
  )
359
- with gr.Accordion("Advanced options", open=False):
 
360
  subject_token_indices = gr.Textbox(
361
  label="Optional: The token indices of each subject (separate indices for the same subject with commas, and for different subjects with semicolons)",
362
  placeholder=SUBJECT_TOKEN_INDICES1,
 
298
 
299
  boxes.append((x1, y1, x2, y2))
300
 
301
+ print(f"Drawn boxes: {boxes}")
302
  layout_image = draw_boxes(boxes)
303
  return [boxes, layout_image]
304
 
 
323
 
324
  def build_example_layout(prompt, *args):
325
  boxes = EXAMPLE_BOXES[prompt]
326
+ print(f"Loaded boxes: {boxes}")
327
 
328
  composite = draw_boxes(boxes, is_sketch=True)
329
  sketchpad = {"background": None, "layers": [], "composite": composite}
 
354
  label="Text prompt",
355
  placeholder=PROMPT1,
356
  )
357
+
358
  subject_sub_prompts = gr.Textbox(
359
+ label="Sub-prompts for each subject (separate with semicolons)",
360
+ placeholder=SUBJECT_SUB_PROMPTS1,
361
  )
362
+
363
+ with gr.Accordion("Precise inputs", open=False):
364
  subject_token_indices = gr.Textbox(
365
  label="Optional: The token indices of each subject (separate indices for the same subject with commas, and for different subjects with semicolons)",
366
  placeholder=SUBJECT_TOKEN_INDICES1,