I hope you are doing well. I am trying to deploy the following application however it crashes unexpectedly without any meaningful error in the logs.
Goal: The main goal of the application is to allow the user to record an audio for about 3 seconds and then press the classify button to predict the emotion of the audio.
Issue: When the application is deployed in Streamlit Cloud, it successfully predicts the emotion for one audio recording however when the user records a second audio and then clicks on the Classify button the application crashes. Therefore, the application works only for one audio file. I believe it is a RAM resource limit however I am not sure and I would like to get your feedback.
I tried st.cahce, deleting all session states, and st.experimental_rerun however nothing worked. Is there something that is being caching and I miss it?
When I reload/rerun the webpage still does not fixes the issue. Moreover, when the application crashes it is unable to be recovered unless it is rebooted. The only way the application works in Streamlit Cloud is to comment lines 296-298 in the audio_processing.py however this produces incorrect output as the user input data to the model is not normalized. Lastly, I want to mention that the application works perfectly locally without commenting the lines mentioned above and with as many audio recordings as desired.
I do not know why the application can successfully run once and then crash. I believed that if the webpage is reloaded manually, then the application will be completely refreshed and able to run one more success run however this is not the case. If there is a solution that the user needs to hard refresh the application manually each time there is a need to do a new recording will also be accepted.
If you need any more information please let me know. Instructions on how to run the application can be found for all operating systems inside the setup folder in the link below. The main libraries and packages of the application can be found in requirements.txt and packages.txt respectively. Python version used is 3.10.8.
Link to the source code deployed application: GitHub - GeorgiosIoannouCoder/vera-ctp
Thank you very much. I appreciate a lot.