Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -145,7 +145,7 @@ def convert_to_json(llm, cv_text):
|
|
| 145 |
"""
|
| 146 |
output = llm.create_chat_completion(
|
| 147 |
messages=[
|
| 148 |
-
{"from": "user", "value": prompt},
|
| 149 |
],
|
| 150 |
max_tokens=maxtokens,
|
| 151 |
temperature=temperature
|
|
@@ -174,7 +174,7 @@ def pdf_to_text(prompt, maxtokens=2048, temperature=0, top_probability=0.95):
|
|
| 174 |
)
|
| 175 |
cv_text, crafted_cv = craft_cv(llm, cv_text, job_description, maxtokens, temperature, top_probability)
|
| 176 |
# cv_text, crafted_cv = craft_cv(llm, prompt, maxtokens, temperature, top_probability)
|
| 177 |
-
crafted_cv = convert_to_json(crafted_cv)
|
| 178 |
return crafted_cv
|
| 179 |
|
| 180 |
temp_slider = gr.Slider(minimum=0, maximum=2, value=0.9, label="Temperature Value")
|
|
|
|
| 145 |
"""
|
| 146 |
output = llm.create_chat_completion(
|
| 147 |
messages=[
|
| 148 |
+
{"from": "user", "value": prompt + ' CV text: ' + cv_text},
|
| 149 |
],
|
| 150 |
max_tokens=maxtokens,
|
| 151 |
temperature=temperature
|
|
|
|
| 174 |
)
|
| 175 |
cv_text, crafted_cv = craft_cv(llm, cv_text, job_description, maxtokens, temperature, top_probability)
|
| 176 |
# cv_text, crafted_cv = craft_cv(llm, prompt, maxtokens, temperature, top_probability)
|
| 177 |
+
crafted_cv = convert_to_json(llm, crafted_cv)
|
| 178 |
return crafted_cv
|
| 179 |
|
| 180 |
temp_slider = gr.Slider(minimum=0, maximum=2, value=0.9, label="Temperature Value")
|