Skip to content

Commit

Permalink
fixed type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Sep 3, 2024
1 parent 42cf172 commit 619780e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions vision_agent/tools/meta_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,9 @@ def florence2_fine_tuning(bboxes: List[Dict[str, Any]], task: str) -> str:
for bbox_input in bboxes_input
]
landing_api = LandingPublicAPI()
# fine_tune_id = str(landing_api.launch_fine_tuning_job(
# "florencev2", task_type, fine_tuning_request
# ))
fine_tune_id = "23b3b022-5ebf-4798-9373-20ef36429abf"
fine_tune_id = str(landing_api.launch_fine_tuning_job(
"florencev2", task_type, fine_tuning_request
))
print(f"[Florence2 fine tuning id: {fine_tune_id}]")
return fine_tune_id

Expand Down Expand Up @@ -504,7 +503,7 @@ def use_florence2_fine_tuning(
if task.lower() == "phrase_grounding":
pattern = r"florence2_phrase_grounding\(([^,]+),\s*([^\)]+)\)"

def replacer(match):
def replacer(match: re.Match) -> str:
arg1 = match.group(1)
arg2 = match.group(2)
return f'florence2_phrase_grounding({arg1}, {arg2}, "{fine_tune_id}")'
Expand Down

0 comments on commit 619780e

Please sign in to comment.