502 Error on streamlit app

Hello,
I am getting an error 502 message on website.My built was successful and I am using free server.The web app was created using streamlit.This a deep learning project.
Below is the log of deployment.

https://cotton-disease-prediction.onrender.com

Mar 11 10:07:50 AM ==> Generating container image from build. This may take a few minutes…
Mar 11 10:12:37 AM ==> Uploading build…
Mar 11 10:13:48 AM ==> Build uploaded in 52s
Mar 11 10:13:48 AM ==> Build successful :tada:
Mar 11 10:13:48 AM ==> Deploying…
Mar 11 10:15:11 AM ==> Starting service with ‘streamlit run webapp3.py’
Mar 11 10:15:23 AM
Mar 11 10:15:23 AM Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.
Mar 11 10:15:23 AM
Mar 11 10:15:28 AM
Mar 11 10:15:28 AM You can now view your Streamlit app in your browser.
Mar 11 10:15:28 AM

Hi,

The shared logs seem to show incorrect IP/ports for deploying to Render.

You would need to configure the server to listen for connections on host address 0.0.0.0 and a port, (10000 is our default). The Streamlit docs show that configuration can be added in various ways. Based on that, maybe the simplest to try would be adding environment variables to your service:

STREAMLIT_SERVER_ADDRESS=0.0.0.0
STREAMLIT_SERVER_PORT=10000

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.