(image_url: str, api_token: str)
| 143 | |
| 144 | |
| 145 | async def remove_background(image_url: str, api_token: str) -> str: |
| 146 | result = await call_replicate_version( |
| 147 | REMOVE_BACKGROUND_VERSION, |
| 148 | { |
| 149 | "image": image_url, |
| 150 | "format": "png", |
| 151 | "reverse": False, |
| 152 | "threshold": 0, |
| 153 | "background_type": "rgba", |
| 154 | }, |
| 155 | api_token, |
| 156 | ) |
| 157 | return _extract_output_url(result, "background remover") |
| 158 | |
| 159 | |
| 160 | async def edit_image( |
no test coverage detected