MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / generate_photo2cartoon

Function generate_photo2cartoon

serving-ml-models/backend/main.py:56–64  ·  view source on GitHub ↗
(file: UploadFile = File(...))

Source from the content-addressed store, hash-verified

54
55@app.post("/photo2cartoon")
56def generate_photo2cartoon(file: UploadFile = File(...)):
57 file_bytes = io.BytesIO(file.file.read())
58 # image = Image.open(file_bytes)
59 # name = f"/data/{str(uuid.uuid4())}.jpg"
60 # image.save(name)
61 cartoon_image = photo_2_cartoon(file_bytes)
62 bytes_io = io.BytesIO()
63 cartoon_image.save(bytes_io, format="PNG")
64 return Response(bytes_io.getvalue(), media_type="image/png")
65
66
67@app.post("/retinaface_anticov")

Callers

nothing calls this directly

Calls 1

photo_2_cartoonFunction · 0.90

Tested by

no test coverage detected