I am using FastAPI for Machine Learning model deployment in two cases based on the nature of the data we feed as inputs (features) which it an array of json. Thus, if inputs are matching method1 we execute the according model to it otherwise we apply method2 and execute the trained model for this case.
How can I achieve this process using FastAPI ? (process of verifieng the input data and apply the matching model for that data)