Commit ·
e454733
1
Parent(s): 7c90bcf
Updated handler file
Browse files- handler.py +5 -2
handler.py
CHANGED
|
@@ -38,9 +38,12 @@ class EndpointHandler():
|
|
| 38 |
A :obj:`dict`:. The object returned should be a dict of one list like {"captions": ["A hugging face at the office"]} containing :
|
| 39 |
- "caption": A string corresponding to the generated caption.
|
| 40 |
"""
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
prompt = data.pop("prompt", None)
|
| 43 |
-
|
|
|
|
| 44 |
|
| 45 |
if isinstance(img_data, Image.Image):
|
| 46 |
raw_image = img_data
|
|
|
|
| 38 |
A :obj:`dict`:. The object returned should be a dict of one list like {"captions": ["A hugging face at the office"]} containing :
|
| 39 |
- "caption": A string corresponding to the generated caption.
|
| 40 |
"""
|
| 41 |
+
print("********* Helllo ***********")
|
| 42 |
+
print(data)
|
| 43 |
+
img_data = data.pop("input", data)
|
| 44 |
prompt = data.pop("prompt", None)
|
| 45 |
+
print("#########")
|
| 46 |
+
# parameters = data.pop("parameters", {})
|
| 47 |
|
| 48 |
if isinstance(img_data, Image.Image):
|
| 49 |
raw_image = img_data
|