Update spelling_grammar_checker.py
Browse files
spelling_grammar_checker.py
CHANGED
|
@@ -29,9 +29,10 @@ def check_spelling_and_grammar(text):
|
|
| 29 |
|
| 30 |
try:
|
| 31 |
error_percentage = float(response_text)
|
| 32 |
-
|
|
|
|
| 33 |
except ValueError:
|
| 34 |
-
return get_error_score(0)
|
| 35 |
|
| 36 |
def evaluate_cv_text(file_path, weights_file):
|
| 37 |
cv_text = process_file(file_path, weights_file)
|
|
|
|
| 29 |
|
| 30 |
try:
|
| 31 |
error_percentage = float(response_text)
|
| 32 |
+
error_score = get_error_score(error_percentage)
|
| 33 |
+
return json.dumps({"score_erreurs": error_score})
|
| 34 |
except ValueError:
|
| 35 |
+
return json.dumps({"score_erreurs": get_error_score(0)})
|
| 36 |
|
| 37 |
def evaluate_cv_text(file_path, weights_file):
|
| 38 |
cv_text = process_file(file_path, weights_file)
|