I’m working with FastAPI for Model inference in Machine Learning, so I need to have as inputs an array of JSON
like this:
[ {"Id":"value","feature1":"value","feature2":"value","feature3":"value" }, {"Id":"value","feature1":"value","feature2":"value","feature3":"value" }, {"Id":"value","feature1":"value","feature2":"value","feature3":"value" }]
The output (result of prediction) should look like this :
[ {"Id":"value","prediction":"value" }, {"Id":"value","prediction":"value" }, {"Id":"value","prediction":"value" }]
How to implement this with FastAPI in Python?