Spaces:
Sleeping
Sleeping
Update cv_analyzer.py
Browse files- cv_analyzer.py +8 -3
cv_analyzer.py
CHANGED
@@ -7,17 +7,22 @@ from cv_prompt import (
|
|
7 |
calculate_section_detection_score,
|
8 |
calculate_overall_score
|
9 |
)
|
10 |
-
from
|
11 |
from langchain.output_parsers import PydanticOutputParser
|
12 |
from spelling_grammar_checker import evaluate_cv_text
|
13 |
from personal_information import analyze_personal_info
|
|
|
14 |
|
15 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
16 |
|
17 |
-
def analyze_cv(
|
18 |
try:
|
|
|
|
|
|
|
|
|
19 |
# Personal Information Analysis
|
20 |
-
personal_info = analyze_personal_info(
|
21 |
|
22 |
# Spelling and Grammar Check
|
23 |
error_percentage, spelling_grammar_score = evaluate_cv_text(text)
|
|
|
7 |
calculate_section_detection_score,
|
8 |
calculate_overall_score
|
9 |
)
|
10 |
+
from hf_utils import get_ai_response
|
11 |
from langchain.output_parsers import PydanticOutputParser
|
12 |
from spelling_grammar_checker import evaluate_cv_text
|
13 |
from personal_information import analyze_personal_info
|
14 |
+
from cv_quality import CV
|
15 |
|
16 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
17 |
|
18 |
+
def analyze_cv(file_path):
|
19 |
try:
|
20 |
+
# Extract text from CV
|
21 |
+
cv = CV(file_path)
|
22 |
+
text = cv.get_cv_text()
|
23 |
+
|
24 |
# Personal Information Analysis
|
25 |
+
personal_info = analyze_personal_info(file_path)
|
26 |
|
27 |
# Spelling and Grammar Check
|
28 |
error_percentage, spelling_grammar_score = evaluate_cv_text(text)
|