srbhr / Resume-Matcher

Resume Matcher is an open source, free tool to improve your resume. It works by using language models to compare and rank resumes with job descriptions.
https://www.resumematcher.fyi/
Apache License 2.0
4.72k stars 1.86k forks source link

Streamlit App fails if base folder is not named "Resume-Matcher" #147

Closed imhalcyon closed 9 months ago

imhalcyon commented 9 months ago

Issue Title

streamlit_app does not work if the imported directory differs from "Resume-Matcher"

Type

Description

This script keeps looking for "Resume-Matcher" folder. If you've renamed the imported repo folder to anything else, the streamlit_app script will never load. https://github.com/srbhr/Resume-Matcher/blob/17e98084925f36ce50a3ebf1dcc7a3ded9f47565/streamlit_app.py#L18 https://github.com/srbhr/Resume-Matcher/blob/17e98084925f36ce50a3ebf1dcc7a3ded9f47565/scripts/similarity/get_similarity_score.py#L46

Expected Behavior

streamlit_app should load without issues

Current Behavior

streamlit_app does not load at all. Have to force close streamlit from Task Manager

Steps to Reproduce

  1. Import git repo into a folder named anything other than "Resume-Matcher"
  2. git clone https://github.com/srbhr/Resume-Matcher.git Test
  3. Run the normal steps
  4. Try to run streamlit run streamlit_app.py

Screenshots / Code Snippets (if applicable)

N/A

Environment

Possible Solution (if you have any in mind)

Remove the custom find_path function. The logic in this function will iteratively keep going back 1 level and search again for the folder. Possible infinite loop scenario - function uses While True. Use session state to hold the directory paths.

Additional Information

N/A

srbhr commented 9 months ago

Hi @imhalcyon , Have you tried moving into the Resume Matcher after taking the docker pull? Are you into the directory?

imhalcyon commented 9 months ago

Hi @imhalcyon , Have you tried moving into the Resume Matcher after taking the docker pull? Are you into the directory?

I'm not using docker.

Just cloned the repo/fork into a folder named "Resume Matcher", followed by virtual environment, install requirements, and run scripts.

srbhr commented 9 months ago

Then after activating the virtual env. CD into resume-matcher folder which you cloned.

imhalcyon commented 9 months ago

Then after activating the virtual env. CD into resume-matcher folder which you cloned.

Try this: git clone https://github.com/srbhr/Resume-Matcher.git Test

The repo will get cloned into "Test" folder. And as there is a hard-dependency on the name of the parent folder, cwd = find_path('Resume-Matcher') will not work.

Anyone using an IDE will get an option to select the folder name. The app, at present, is forcing everyone to use "Resume-Matcher" as the name.

srbhr commented 9 months ago

@imhalcyon see the how to install steps:

git clone https://github.com/<YOUR-USERNAME>/Resume-Matcher.git

cd Resume-Matcher

As the files are located in the resume matcher folder. After cloning.

imhalcyon commented 9 months ago

Closing the issue as it is an edge case if user does not following instructions to the dot - this is as per design. Having a white-space in folder name might cause issues downstream (as it is translated to %20).

Note: The app will not warn the user and will keep looking for "Resume-Matcher" folder in a while loop forever.