Commit
·
f37021f
1
Parent(s):
3cba83e
try a thing
Browse files- handler.py +5 -3
handler.py
CHANGED
@@ -33,11 +33,13 @@ class EndpointHandler():
|
|
33 |
A :obj:`dict`:. base64 encoded image
|
34 |
"""
|
35 |
prompt = data.pop("inputs", data)
|
36 |
-
|
37 |
-
|
38 |
-
url = params.pop("url", data)
|
39 |
init_image = Image.open(url).convert("RGB")
|
40 |
init_image.thumbnail((512, 512))
|
|
|
|
|
|
|
|
|
41 |
# hyperparamters
|
42 |
num_inference_steps = params.pop("num_inference_steps", 25)
|
43 |
guidance_scale = params.pop("guidance_scale", 7.5)
|
|
|
33 |
A :obj:`dict`:. base64 encoded image
|
34 |
"""
|
35 |
prompt = data.pop("inputs", data)
|
36 |
+
url = data.pop("url", data)
|
|
|
|
|
37 |
init_image = Image.open(url).convert("RGB")
|
38 |
init_image.thumbnail((512, 512))
|
39 |
+
|
40 |
+
|
41 |
+
params = data.pop("parameters", data)
|
42 |
+
|
43 |
# hyperparamters
|
44 |
num_inference_steps = params.pop("num_inference_steps", 25)
|
45 |
guidance_scale = params.pop("guidance_scale", 7.5)
|