pktpaulie commited on
Commit
ca5e128
·
verified ·
1 Parent(s): bd9851b

Update similarity_score_refined.py

Browse files
Files changed (1) hide show
  1. similarity_score_refined.py +2 -2
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 = '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'
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='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'
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}"