omarelsayeed commited on
Commit
0b742a9
1 Parent(s): 6329b7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -54,7 +54,9 @@ def parse_logits(logits: torch.Tensor, length: int) -> List[int]:
54
  return ret
55
 
56
  def get_orders(image_path, boxes):
 
57
  boxes = scale_and_normalize_boxes(boxes)
 
58
  inputs = boxes2inputs(boxes)
59
  inputs = {k: v.to(layout_model.device) for k, v in inputs.items()} # Move inputs to model device
60
  logits = layout_model(**inputs).logits.cpu().squeeze(0) # Perform inference and get logits
 
54
  return ret
55
 
56
  def get_orders(image_path, boxes):
57
+ print(boxes)
58
  boxes = scale_and_normalize_boxes(boxes)
59
+ print(boxes)
60
  inputs = boxes2inputs(boxes)
61
  inputs = {k: v.to(layout_model.device) for k, v in inputs.items()} # Move inputs to model device
62
  logits = layout_model(**inputs).logits.cpu().squeeze(0) # Perform inference and get logits