Getting 404 error after I deployed my app

I followed all the steps from my streamlit share invite, but I keep getting a 404 error after I deploy my app. What could be the possible reason?

Link to the repo - GitHub - Avhijit-codeboy/Heart_Stroke_Prediction

I’ve got no error logs other than the page displaying a 404 error.

Hey @Avhijit-codeboy,

First, Welcome to the community! :partying_face: :partying_face: :tada:

Glad to see you made a post here, When I got up this morning and was able to get through all the emails I found yours and replied. Let me copy that over here, as we will need some more details to be able to help you at all.

"Not sure, this could be for a number of reasons. The best place to get answers to your questions is our community forum: https://discuss.streamlit.io/ (you might even find an answer to your question before you ask it!)

When you post to the community, make sure to follow the guidelines here: Welcome ! Some suggestions for your first Streamlit question

At a minimum, add the link to the repo you’re trying to deploy from and the error logs from when you tried to deploy your app. Without these things, it’s nearly impossible to help troubleshoot!"

Happy Streamlit-ing!
Marisa

Hi @Marisa_Smith !

I’ve edited the post to put my Github repo. Hope it helps.
As for the error logs, all I got is the page displaying “Four Oh Four”.

Hey @Avhijit-codeboy,

It helped A LOT! Thank you!

So I seem to be able to deploy your app totally fine (with a minor adjustment to the file paths which I will explain).

In fact, your app is now deployed here: https://share.streamlit.io/mesmith027/heart_stroke_prediction/main/stroke_detection/heart_stroke_prediction_app.py

This makes me think that there is an issue with your account from our side. I am sending this on to engineering and I will get back to you once I know more!

File Path on Streamlit Sharing:
Because your app’s repo has a subfolder with all your code and main python app file you need to add the subfolder to all the places where you’re using a direct file path. This is because, in Streamlit Sharing, your app is actually “run” from the top directory and therefore can’t find the image/ folder or classifier.pkl, you need to add the sub-directory name in front of these (stroke_detection/).

In the meantime, I have made a PR to your repo to change those path names!

Happy Streamlit-ing
Marisa

1 Like

Ah… I see!
Thanks a lot for all the help! :relaxed:

Hey @Avhijit-codeboy,

The Team has updated your account in our system. You should be good to go now!

Happy Streamlit-ing!
Marisa

Thank you @Marisa_Smith !

1 Like