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

Function process_resnext

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

Source from the content-addressed store, hash-verified

26
27@app.post("/resnext")
28def process_resnext(file: UploadFile = File(...)):
29 file_bytes = file.file.read()
30 image = Image.open(io.BytesIO(file_bytes))
31 name = f"/data/{str(uuid.uuid4())}.jpg"
32 image.save(name)
33 predictions = resnext(image)
34 return predictions
35 # return Response(content=json.dumps(predictions), media_type="application/json")
36 # return Response(file_bytes, media_type="image/jpg")
37
38
39@app.get("/pgan")

Callers

nothing calls this directly

Calls 1

resnextFunction · 0.90

Tested by

no test coverage detected