-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Api Keys #243
No Api Keys #243
Conversation
Thanks a lot, @SubramanyamChalla24, for this PR. It's much needed, as it'll ease the process of knowing the % match score of the resumes and the JDs. Before merging, I will be testing out this PR on:
Python Version will be 3.11 (the one with GIL) |
@Devasy23 @imhalcyon @Sayvai Please can you help me in testing this on:
|
@SubramanyamChalla24, the changes are working smoothly on MacOS! ![]() I'll keep this PR open if anyone wants to test it on Windows, and Linux. Else, by Friday I will merge it. |
I'll review before Friday, but the dependencies weren't working for me on Linux with python 3.10, but they are working for 3.11.5 specified in doc |
Okay then we make sure that we'll mention Python 3.11 specifically |
Also, we'll have to clean the Requirements.txt file as well |
else: | ||
print("Config file does not exist.") | ||
|
||
resume_string = ' '.join(selected_file["extracted_keywords"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The refactoring update simplifies variable assignments and updates method access, which is good. A suggestion would include error handling around the new function get_score
to ensure robustness.
Example:
try:
result = get_score(resume_string, jd_string)
similarity_score = result[0].score
st.write("Similarity Score obtained for the resume and job description is:", similarity_score)
except Exception as e:
st.error(f"Failed to get similarity score: {e}")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Devasy23, maybe you can have your fix ready when this merges on Friday. And then do a PR to master with the add-ons/enhancements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, but should I push to @SubramanyamChalla24 's PR or create a new PR to patch those changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your code has a good structure and makes use of proper logging and exception handling. Here are a few suggestions for improvement:
-
Avoid Repeated Code: The logging configuration is done twice, both at the beginning and when
file_handler
andconsole_handler
are set up. Consider keeping only one of those configurations or merge them if different configurations are necessary for different handlers. -
Exception Handling in
read_config
: ReturningNone
when encountering an error might lead to type errors later. Consider raising an exception or ensure that the calling code can handleNone
types.
Here's a small code improvement for logging setup:
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
console_handler = logging.StreamHandler()
console_handler.setFormatter(formatter)
console_handler.setLevel(logging.DEBUG)
file_handler = logging.FileHandler("app_similarity_score.log")
file_handler.setFormatter(formatter)
file_handler.setLevel(logging.DEBUG)
logger.addHandler(file_handler)
logger.addHandler(console_handler)
Alternatively you could had also reused the logger from logger.py
@Devasy23, those are some excellent add-ons. Once this PR gets merged tomorrow, you can do a PR that updates this. |
Pull Request Title
Removed Vector Databases
Related Issue
Description
Type
Proposed Changes
Screenshots / Code Snippets (if applicable)
How to Test
Checklist
Additional Information