|
from handler import EndpointHandler |
|
from PIL import Image |
|
|
|
|
|
my_handler = EndpointHandler(path=".") |
|
|
|
|
|
reg_payload = {"inputs": "An astronaut riding a horse on the moon, <comic-strip> style"} |
|
neg_payload = {"inputs": "A strawberry on the beach, <comic-strip> style", "negative_prompt": "black and white"} |
|
multi_payload = {"inputs": ["A strawberry on the beach, <comic-strip> style", "An astronaut riding a horse on the moon, <comic-strip> style"], "negative_prompt": "black and white"} |
|
|
|
|
|
reg_payload_pred=my_handler(reg_payload) |
|
neg_payload_pred=my_handler(neg_payload) |
|
multi_payload_pred=my_handler(multi_payload) |
|
|
|
reg_payload_pred[0].save("reg_payload_pred.png") |
|
neg_payload_pred[0].save("neg_payload_pred.png") |
|
|