Spaces:
Sleeping
Sleeping
Update similarity_score_refined.py
Browse files
similarity_score_refined.py
CHANGED
@@ -78,7 +78,7 @@ def calculate_tfidf(doc):
|
|
78 |
|
79 |
def call_chatgpt_api(prompt, api_key,model="gpt-3.5-turbo"):
|
80 |
import openai
|
81 |
-
openai.api_key =
|
82 |
response = openai.ChatCompletion.create(
|
83 |
model="gpt-3.5-turbo",
|
84 |
messages=[
|
@@ -110,7 +110,7 @@ def similarity_main(resume_path,job_description_path):
|
|
110 |
# Extract text from files (replace with actual file paths)
|
111 |
Resume_text = extract_text(resume_path)
|
112 |
job_des = extract_text(job_description_path)
|
113 |
-
api_key=
|
114 |
|
115 |
|
116 |
prompt=f"Extract the skills or competencies section from the resume. Avoid using name of the candidate:\n\n{Resume_text}"
|
|
|
78 |
|
79 |
def call_chatgpt_api(prompt, api_key,model="gpt-3.5-turbo"):
|
80 |
import openai
|
81 |
+
openai.api_key = api_key
|
82 |
response = openai.ChatCompletion.create(
|
83 |
model="gpt-3.5-turbo",
|
84 |
messages=[
|
|
|
110 |
# Extract text from files (replace with actual file paths)
|
111 |
Resume_text = extract_text(resume_path)
|
112 |
job_des = extract_text(job_description_path)
|
113 |
+
api_key=os.environ.get(OPENAI_KEY)
|
114 |
|
115 |
|
116 |
prompt=f"Extract the skills or competencies section from the resume. Avoid using name of the candidate:\n\n{Resume_text}"
|