chansung commited on
Commit
7f1c80b
·
1 Parent(s): 0c29730

add custom handler

Browse files
Files changed (2) hide show
  1. __pycache__/handler.cpython-38.pyc +0 -0
  2. handler.py +1 -1
__pycache__/handler.cpython-38.pyc CHANGED
Binary files a/__pycache__/handler.cpython-38.pyc and b/__pycache__/handler.cpython-38.pyc differ
 
handler.py CHANGED
@@ -8,7 +8,7 @@ class EndpointHandler():
8
 
9
  def __call__(self, data: Dict[str, Any]) -> bytes:
10
  # get inputs
11
- prompt = data.pop("prompt", data)
12
 
13
  # run normal prediction
14
  images = self.sd.text_to_image(prompt, batch_size=1)
 
8
 
9
  def __call__(self, data: Dict[str, Any]) -> bytes:
10
  # get inputs
11
+ prompt = data.pop("inputs", data)
12
 
13
  # run normal prediction
14
  images = self.sd.text_to_image(prompt, batch_size=1)