jadechoghari commited on
Commit
6e3e9da
1 Parent(s): d347b1f

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +2 -0
inference.py CHANGED
@@ -123,6 +123,8 @@ def infer_ui_task(image_path, prompt, model_path, task, region=None, add_region_
123
  """
124
  Handles task types: box_in_tasks, box_out_tasks, no_box_tasks.
125
  """
 
 
126
  if task in box_in_tasks and region is None:
127
  raise ValueError(f"Task {task} requires a bounding box region.")
128
 
 
123
  """
124
  Handles task types: box_in_tasks, box_out_tasks, no_box_tasks.
125
  """
126
+ if region is not None:
127
+ add_region_feature=True
128
  if task in box_in_tasks and region is None:
129
  raise ValueError(f"Task {task} requires a bounding box region.")
130