Serkan Ozturk
commited on
Commit
·
3c52688
1
Parent(s):
4021f2d
sdh
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -8,7 +8,7 @@ from serkan import SimpleUpscaleModel
|
|
| 8 |
import os
|
| 9 |
from PIL import Image
|
| 10 |
|
| 11 |
-
def decode_image(
|
| 12 |
"""Decode base64 string to an image (numpy array)"""
|
| 13 |
image_data = base64.b64decode(base64_str)
|
| 14 |
image = Image.open(io.BytesIO(image_data))
|
|
|
|
| 8 |
import os
|
| 9 |
from PIL import Image
|
| 10 |
|
| 11 |
+
def decode_image(base64_str: str) -> np.ndarray:
|
| 12 |
"""Decode base64 string to an image (numpy array)"""
|
| 13 |
image_data = base64.b64decode(base64_str)
|
| 14 |
image = Image.open(io.BytesIO(image_data))
|