mirror of
https://github.com/jantic/DeOldify.git
synced 2026-08-29 02:10:55 +08:00
Add accept header for permit all MIME types
This commit is contained in:
@@ -62,7 +62,7 @@ class ModelImageVisualizer:
|
||||
return PIL.Image.open(path).convert('RGB')
|
||||
|
||||
def _get_image_from_url(self, url: str) -> Image:
|
||||
response = requests.get(url, timeout=30)
|
||||
response = requests.get(url, timeout=30, headers={'Accept': '*/*;q=0.8'})
|
||||
img = PIL.Image.open(BytesIO(response.content)).convert('RGB')
|
||||
return img
|
||||
|
||||
|
||||
Reference in New Issue
Block a user