Fix model loading and prediction logic in various APIs; improve error… #741
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes:
Model Loading and Prediction Logic:
Updated the model loading mechanism in the sugarcane-disease-api to improve error handling when loading multiple pre-trained models.
Refactored the prediction function to ensure it handles image preprocessing more robustly, enhancing overall prediction accuracy.
Documentation Updates:
Revised the README.md file to include clear installation instructions and usage guidelines for the API.
Added examples of how to use the sugarcane disease prediction API and improved overall documentation clarity.
API Enhancements:
Improved error handling in the API endpoints to return more informative messages in case of failure.
Optimized performance in various API modules, particularly in the plant_disease_detection and mushroom_edibility APIs.
Dependency Updates:
Updated several dependencies in the package.json file to ensure compatibility and leverage new features or security fixes.
Configuration File Modifications:
Made necessary adjustments to configuration files such as next.config.js and tailwind.config.js for better compatibility with recent updates.