An interactive web application developed with Streamlit, designed for making predictions using various machine learning models. The app dynamically generates forms and pages from JSON configuration files. ⭐ If you found this helpful, consider starring the repo!
This pull request enhances the error handling in our Streamlit application by improving the way we load the configuration file in the FormHandler class. With these updates, the app will now handle cases where the configuration file is missing or contains invalid JSON, providing clear error messages to the user instead of crashing.
Issue Resolved
This PR resolves #44
Changes Made
Improved Error Handling: In the load_fields_from_config method, I added try-except blocks to catch specific errors:
If the configuration file cannot be found, the app will display a message indicating that the file is missing.
If there's an error parsing the JSON, the app will inform the user about the parsing issue.
This ensures that users receive clear feedback on what went wrong, making it easier to troubleshoot issues.
Additional Details
These improvements contribute to a more robust user experience by preventing crashes and guiding users on how to resolve configuration-related issues effectively.
[x] I have thoroughly reviewed and updated the requirements.txt file to include any new packages
[x] The predict.py file includes a properly implemented model_details() function, or the notebook contains this function to print a detailed model report. The model will not be accepted without this function, as it is essential for generating the necessary model details.
[x] I have added relevant tests (if necessary).
[x] I have added comments in the code where needed.
[x] This PR is submitted under Hacktoberfest.
[x] This PR is submitted under GirlScript Summer of Code (GSSoC-Extd).
I’m new to GSSoC and GitHub, so please forgive me if I made any mistakes during this process. I appreciate any feedback you may have, and let me know if any changes are required.
Thank You!
Description
This pull request enhances the error handling in our Streamlit application by improving the way we load the configuration file in the FormHandler class. With these updates, the app will now handle cases where the configuration file is missing or contains invalid JSON, providing clear error messages to the user instead of crashing.
Issue Resolved
This PR resolves #44
Changes Made
This ensures that users receive clear feedback on what went wrong, making it easier to troubleshoot issues.
Additional Details
These improvements contribute to a more robust user experience by preventing crashes and guiding users on how to resolve configuration-related issues effectively.
Checklist
requirements.txt
file to include any new packagespredict.py
file includes a properly implementedmodel_details()
function, or the notebook contains this function to print a detailed model report. The model will not be accepted without this function, as it is essential for generating the necessary model details.