Zhibinhong commited on
Commit
c968655
1 Parent(s): 9701c1e

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +4 -3
handler.py CHANGED
@@ -12,9 +12,10 @@ class EndpointHandler():
12
  self.pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(self.pipe.scheduler.config)
13
 
14
  def __call__(self, data):
15
-
16
- image=data.pop("image",data)
17
- prompt=data.pop("prompt",data).decode('utf-8')
 
18
  image=base64.b64decode(image)
19
  raw_images = Image.open(BytesIO(image)).convert('RGB')
20
 
 
12
  self.pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(self.pipe.scheduler.config)
13
 
14
  def __call__(self, data):
15
+
16
+ info=data['inputs']
17
+ image=info.pop("image",data)
18
+ prompt=info.pop("prompt",data).decode('utf-8')
19
  image=base64.b64decode(image)
20
  raw_images = Image.open(BytesIO(image)).convert('RGB')
21