Commit 367c364d authored by novelailab's avatar novelailab

fix

parent d73b5fe0
...@@ -117,6 +117,7 @@ def generate(request: GenerationRequest): ...@@ -117,6 +117,7 @@ def generate(request: GenerationRequest):
os.kill(mainpid, signal.SIGTERM) os.kill(mainpid, signal.SIGTERM)
return {"error": str(e)} return {"error": str(e)}
'''
@app.post('/image-to-image') @app.post('/image-to-image')
def image_to_image(request: GenerationRequest): def image_to_image(request: GenerationRequest):
#prompt is a base64 encoded image #prompt is a base64 encoded image
...@@ -135,7 +136,7 @@ def image_to_image(request: GenerationRequest): ...@@ -135,7 +136,7 @@ def image_to_image(request: GenerationRequest):
#get base64 of image #get base64 of image
image = base64.b64encode(image).decode("ascii") image = base64.b64encode(image).decode("ascii")
return GenerationOutput(output=[image]) return GenerationOutput(output=[image])
'''
@app.post('/generate', response_model=Union[GenerationOutput, ErrorOutput]) @app.post('/generate', response_model=Union[GenerationOutput, ErrorOutput])
def generate(request: GenerationRequest): def generate(request: GenerationRequest):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment