Skip to content

Commit

Permalink
chore: fix img background remover test
Browse files Browse the repository at this point in the history
  • Loading branch information
agallardol committed Jan 22, 2025
1 parent cdada96 commit 1a9f743
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/shinkai-tools-runner/src/tools/python_runner.test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1382,9 +1382,10 @@ async def run(c: CONFIG, p: INPUTS) -> OUTPUT:
print(f"Downloading from URL: {p.path}")
response = requests.get(p.path)
response.raise_for_status()
with open(output_path + '.tmp', 'wb') as f:
temp_path = output_path.replace('.png', '.tmp.png')
with open(temp_path, 'wb') as f:
f.write(response.content)
p.path = output_path.replace('.png', 'temp.png')
p.path = temp_path
print(f"Downloaded to: {p.path}")
print(f"Processing image: {p.path}")
Expand Down

0 comments on commit 1a9f743

Please sign in to comment.