Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import os
|
|
4 |
import openai
|
5 |
import re
|
6 |
import plotly.graph_objects as go
|
7 |
-
|
8 |
class ResumeAnalyser:
|
9 |
def __init__(self):
|
10 |
pass
|
@@ -37,9 +37,9 @@ class ResumeAnalyser:
|
|
37 |
def responce_from_ai(self,textjd, textcv):
|
38 |
resume = self.extract_text_from_file(textjd)
|
39 |
job_description = self.extract_text_from_file(textcv)
|
40 |
-
|
41 |
-
response =
|
42 |
-
engine="
|
43 |
prompt=f"""
|
44 |
Given the job description and the resume, assess the matching percentage to 100 and if 100 percentage not matched mention the remaining percentage with reason. **Job Description:**{job_description}**Resume:**{resume}
|
45 |
**Detailed Analysis:**
|
|
|
4 |
import openai
|
5 |
import re
|
6 |
import plotly.graph_objects as go
|
7 |
+
from openai import OpenAI
|
8 |
class ResumeAnalyser:
|
9 |
def __init__(self):
|
10 |
pass
|
|
|
37 |
def responce_from_ai(self,textjd, textcv):
|
38 |
resume = self.extract_text_from_file(textjd)
|
39 |
job_description = self.extract_text_from_file(textcv)
|
40 |
+
client = OpenAI()
|
41 |
+
response = client.chat.completions.create(
|
42 |
+
engine="gpt-3.5-turbo",
|
43 |
prompt=f"""
|
44 |
Given the job description and the resume, assess the matching percentage to 100 and if 100 percentage not matched mention the remaining percentage with reason. **Job Description:**{job_description}**Resume:**{resume}
|
45 |
**Detailed Analysis:**
|