Stuck in handling incorrect input data on web app for model training
I am trying to add an exception feature in an ML project I am working on, I create a web app which accepts student performance data as a CSV file and then performs different machine learning algorithms and selects and saves the model with the best R2 score, it deletes any previous model if already existing and replaces it with model trained on new data, and then displays the R2 score to the user. The app is working fine with correct data, I tried to build a process to show an error message to the user if the input data is incorrect. I have this use case where in the following portion of the CSV file I deleted one of the column entries in one of the record: