Spaces:
Sleeping
Sleeping
Delete cv_prompt.py
Browse files- cv_prompt.py +0 -24
cv_prompt.py
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
import json
|
2 |
-
|
3 |
-
# Load the JSON file
|
4 |
-
with open('cv_sections.json', 'r') as f:
|
5 |
-
cv_sections_data = json.load(f)
|
6 |
-
|
7 |
-
def get_cv_prompt(text):
|
8 |
-
sections_list = ", ".join(cv_sections_data["sections"].keys())
|
9 |
-
return f"""<s>[INST] Analyze this CV text in any language. Return a JSON object with key "present_sections" containing an array of sections present from this list: {sections_list}. A section is present if its content is identifiable, even without an explicit title. Consider synonyms and alternative phrasings in any language.
|
10 |
-
CV text:
|
11 |
-
{text}
|
12 |
-
Respond only with the JSON object, no explanation. [/INST]"""
|
13 |
-
|
14 |
-
def get_location_prompt(text):
|
15 |
-
return f"""<s>[INST] Extract the city and country from the following text. The text may be in any language. Respond in the format 'City: [city name], Country: [country name]'. If you can't find the information, respond with 'Not found'.
|
16 |
-
Text:
|
17 |
-
{text}
|
18 |
-
[/INST]"""
|
19 |
-
|
20 |
-
def get_spelling_grammar_prompt(text):
|
21 |
-
return f"""<s>[INST] Analyze the following text for spelling and grammar errors. The text may be in any language. Do not correct the errors, just count them. Calculate the percentage of words with errors.
|
22 |
-
Text to analyze:
|
23 |
-
{text}
|
24 |
-
[/INST]"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|