Closed mohamedaleya closed 10 months ago
Hi @mohamedaleya, thanks for this PR. But Streamlit_second is for deploying to streamlit for demo purpose. You aren't required to run it.
Hi @mohamedaleya, thanks for this PR. But Streamlit_second is for deploying to streamlit for demo purpose. You aren't required to run it.
Sorry my bad. I have now updated the PR with changes applied to streamlit_app as well. Let me know if there's anything else I should rectify!
This was fixed.
Issue Title
Having less than 2 resumes causes an error: "IndexError: list index out of range"
Type
Description
If you have 2 resumes or less, you will receive an error after launching the app with the command
streamlit run streamlit_app.py
(orstreamlit run streamlit_second.py
). The slider defaults to the max index of the list. Resulting in an attempt to render a non-existent item. Also if you have only 1 resume, you shouldn't have a slider. And if you have no resume, some hint should be displayed to remind the user to add a resume.This issue should help improve the UX for the time being until the new web app version is available to users.
Expected Behavior
There should be no errors, no matter how many resumes the user has. The four points above make sure of that.
Current Behavior
If I have 1 resume, the slider will have 0, 1 and 2 indexes. 1 and 2 do not work. Therefore I need to set the slider to the index 0 to see relevant results.
Steps to Reproduce
streamlit run streamlit_app.py
.Screenshots / Code Snippets (if applicable)
Environment
Possible Solution (if you have any in mind)
Add conditions to display the appropriate content for no resumes, 1 resume, and 1 or more resumes available.
Additional Information
I've worked on a solution and will follow up on this issue with a PR.