Commit ·
000d5f1
1
Parent(s): 5f7473f
fix data_uri
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -36,7 +36,7 @@ class EndpointHandler():
|
|
| 36 |
prompt = data.pop("inputs", data)
|
| 37 |
url = data.pop("url", data)
|
| 38 |
|
| 39 |
-
with request.urlopen(
|
| 40 |
data = response.read()
|
| 41 |
init_image = Image.open(BytesIO(data)).convert("RGB")
|
| 42 |
init_image = Image.open(url)
|
|
|
|
| 36 |
prompt = data.pop("inputs", data)
|
| 37 |
url = data.pop("url", data)
|
| 38 |
|
| 39 |
+
with request.urlopen(url) as response:
|
| 40 |
data = response.read()
|
| 41 |
init_image = Image.open(BytesIO(data)).convert("RGB")
|
| 42 |
init_image = Image.open(url)
|