Nassira commited on
Commit
6f3161f
·
verified ·
1 Parent(s): d489880

Update cv_prompt.py

Browse files
Files changed (1) hide show
  1. cv_prompt.py +14 -2
cv_prompt.py CHANGED
@@ -14,5 +14,17 @@ CV text:
14
  Respond only with the JSON object, no explanation. [/INST]"""
15
 
16
  def get_location_prompt(text):
17
- return f"""Extract the city and country from the following text. Respond in the format 'City: [city name], Country: [country name]'. If you can't find the information, respond with 'Not found'. Here's the text:
18
- {text}"""
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  Respond only with the JSON object, no explanation. [/INST]"""
15
 
16
  def get_location_prompt(text):
17
+ 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'.
18
+
19
+ Text:
20
+ {text}
21
+
22
+ [/INST]"""
23
+
24
+ def get_spelling_grammar_prompt(text):
25
+ 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.
26
+
27
+ Text to analyze:
28
+ {text}
29
+
30
+ Respond with only a single number representing the percentage of words with errors, rounded to two decimal places. For example, if 5% of words have errors, respond with just "5.00". [/INST]"""