attention-refocusing commited on
Commit
526c7ec
β€’
1 Parent(s): b815839

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -378,7 +378,7 @@ def draw(task, input, grounding_texts, new_image_trigger, state, generate_parsed
378
  generate_parsed = 0
379
  # import pdb; pdb.set_trace()
380
  print('do nothing')
381
- print('boxes', box_image.size)
382
  return [box_image, new_image_trigger, 1., state, generate_parsed]
383
 
384
  else:
@@ -440,10 +440,10 @@ def draw(task, input, grounding_texts, new_image_trigger, state, generate_parsed
440
  grounding_texts = [x for x in grounding_texts if len(x) > 0]
441
  if len(grounding_texts) < len(state['boxes']):
442
  grounding_texts += [f'Obj. {bid+1}' for bid in range(len(grounding_texts), len(state['boxes']))]
443
- if box_image is not None: print('boxes', box_image.size)
444
  box_image = draw_box(state['boxes'], grounding_texts, image)
445
  generate_parsed = 0
446
- print('img scale',image_scale)
447
  return [box_image, new_image_trigger, image_scale, state, generate_parsed]
448
 
449
  def change_state(bboxes,layout, state, instruction):
 
378
  generate_parsed = 0
379
  # import pdb; pdb.set_trace()
380
  print('do nothing')
381
+
382
  return [box_image, new_image_trigger, 1., state, generate_parsed]
383
 
384
  else:
 
440
  grounding_texts = [x for x in grounding_texts if len(x) > 0]
441
  if len(grounding_texts) < len(state['boxes']):
442
  grounding_texts += [f'Obj. {bid+1}' for bid in range(len(grounding_texts), len(state['boxes']))]
443
+
444
  box_image = draw_box(state['boxes'], grounding_texts, image)
445
  generate_parsed = 0
446
+
447
  return [box_image, new_image_trigger, image_scale, state, generate_parsed]
448
 
449
  def change_state(bboxes,layout, state, instruction):