manuel
commited on
Commit
·
39d194f
1
Parent(s):
24dbd9c
binary
Browse files- handler.py +5 -2
handler.py
CHANGED
@@ -79,8 +79,11 @@ class EndpointHandler():
|
|
79 |
elif input_type == "processed_images":
|
80 |
try:
|
81 |
binary = base64.b64decode(inputs)
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
84 |
except Exception as e:
|
85 |
return {"error": f"Error processing preprocessed images: {str(e)}"}
|
86 |
|
|
|
79 |
elif input_type == "processed_images":
|
80 |
try:
|
81 |
binary = base64.b64decode(inputs)
|
82 |
+
print("decoded binary")
|
83 |
+
buffer = io.BytesIO(binary)
|
84 |
+
print("buffered")
|
85 |
+
batch = torch.load(buffer, map_location=self.model.device)
|
86 |
+
print("loaded as torch")
|
87 |
except Exception as e:
|
88 |
return {"error": f"Error processing preprocessed images: {str(e)}"}
|
89 |
|