You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor Gradio Demo Script for Improved Model Loading and Prediction
- Updated the `predict` function to accept a pre-loaded session instead of a model path, enhancing efficiency by loading the model once at startup.
- Removed model loading timing from the status message, focusing on preprocessing, inference, and postprocessing times.
- Improved error handling by raising a RuntimeError if model loading fails, ensuring robust feedback for users.
- Streamlined the click event in the Gradio interface to pass the session directly, simplifying the function signature.
0 commit comments