alvarobartt HF staff commited on
Commit
5a89820
1 Parent(s): 74b74f6

Update handler.py

Browse files
Files changed (1) hide show
  1. 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.debug(f"Received incoming request with {data=}")
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
- generation_config = input.get("generation_config", dict(max_new_tokens=1024, do_sample=False))
 
 
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