Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14040

FastAPI array of JSON in Request Body for Machine Learning prediction

$
0
0

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?


Viewing all articles
Browse latest Browse all 14040

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>