Commit
•
5a89820
1
Parent(s):
74b74f6
Update handler.py
Browse files- handler.py +4 -2
handler.py
CHANGED
@@ -160,7 +160,7 @@ class EndpointHandler:
|
|
160 |
"The request body must contain a key 'inputs' with a list of inputs."
|
161 |
)
|
162 |
|
163 |
-
logger.
|
164 |
|
165 |
predictions = []
|
166 |
for input in data["inputs"]:
|
@@ -169,7 +169,9 @@ class EndpointHandler:
|
|
169 |
"The request input body must contain a key 'prompt' with the prompt to use."
|
170 |
)
|
171 |
|
172 |
-
|
|
|
|
|
173 |
|
174 |
if "image_url" not in input:
|
175 |
# pure-text conversation
|
|
|
160 |
"The request body must contain a key 'inputs' with a list of inputs."
|
161 |
)
|
162 |
|
163 |
+
logger.info(f"Received incoming request with {data=}")
|
164 |
|
165 |
predictions = []
|
166 |
for input in data["inputs"]:
|
|
|
169 |
"The request input body must contain a key 'prompt' with the prompt to use."
|
170 |
)
|
171 |
|
172 |
+
logger.info(f"{input=}")
|
173 |
+
# generation_config = input.get("generation_config", dict(max_new_tokens=1024, do_sample=False))
|
174 |
+
generation_config = dict(max_new_tokens=1024, do_sample=False)
|
175 |
|
176 |
if "image_url" not in input:
|
177 |
# pure-text conversation
|