serhatderya commited on
Commit
c6d41c8
·
1 Parent(s): 5641d09

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +3 -2
handler.py CHANGED
@@ -33,8 +33,9 @@ class EndpointHandler:
33
  The payload with the text prompt and generation parameters.
34
  """
35
  # process input
36
- image_base64 = data.pop("image_base64", None)
37
- prompt = data.pop("prompt", None)
 
38
 
39
  # preprocess
40
  image = Image.open(BytesIO(base64.b64decode(image_base64)))
 
33
  The payload with the text prompt and generation parameters.
34
  """
35
  # process input
36
+ inputs = data.pop("inputs", data)
37
+ image_base64 = inputs["image_base64"]
38
+ prompt = inputs["prompt"]
39
 
40
  # preprocess
41
  image = Image.open(BytesIO(base64.b64decode(image_base64)))