Skip to content

Commit

Permalink
fixed typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Mar 25, 2024
1 parent bef5913 commit 37b96be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions vision_agent/agent/vision_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def self_reflect(
question=question, tool_results=str(tool_result), final_answer=final_answer
)
if issubclass(type(reflect_model), LMM):
return reflect_model(prompt, image=image)
return reflect_model(prompt, image=image) # type: ignore
return reflect_model(prompt)


Expand Down Expand Up @@ -384,7 +384,7 @@ def chat_with_workflow(

reflections = ""
final_answer = ""
all_tool_results = []
all_tool_results: List[Dict] = []

for _ in range(self.max_retries):
task_list = create_tasks(self.task_model, question, self.tools, reflections)
Expand Down
4 changes: 2 additions & 2 deletions vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ class SegArea(Tool):

def __call__(self, masks: Union[str, Path]) -> float:
pil_mask = Image.open(str(masks))
np_mask = np.array(pil_mask) # type: ignore
return round(np.sum(np_mask) / 255, 2)
np_mask = np.array(pil_mask)
return cast(float, round(np.sum(np_mask) / 255, 2))


class Add(Tool):
Expand Down

0 comments on commit 37b96be

Please sign in to comment.