Spaces:
Sleeping
Sleeping
Commit
•
548cae8
1
Parent(s):
34df91a
Update app.py (#3)
Browse files- Update app.py (8cb34e1fddc7cc1abd34297338db43e8563e6605)
Co-authored-by: M <[email protected]>
app.py
CHANGED
@@ -43,6 +43,7 @@ class CourseGenarator:
|
|
43 |
return "Unsupported file type"
|
44 |
|
45 |
def response(self,resume_path):
|
|
|
46 |
resume_path = resume_path.name
|
47 |
resume = self.extract_text_from_file(resume_path)
|
48 |
|
@@ -54,7 +55,7 @@ class CourseGenarator:
|
|
54 |
]
|
55 |
|
56 |
# Call OpenAI GPT-3.5-turbo
|
57 |
-
chat_completion =
|
58 |
model = "gpt-3.5-turbo",
|
59 |
messages = conversation,
|
60 |
max_tokens=500,
|
|
|
43 |
return "Unsupported file type"
|
44 |
|
45 |
def response(self,resume_path):
|
46 |
+
client = OpenAI()
|
47 |
resume_path = resume_path.name
|
48 |
resume = self.extract_text_from_file(resume_path)
|
49 |
|
|
|
55 |
]
|
56 |
|
57 |
# Call OpenAI GPT-3.5-turbo
|
58 |
+
chat_completion = client.chat.completions.create(
|
59 |
model = "gpt-3.5-turbo",
|
60 |
messages = conversation,
|
61 |
max_tokens=500,
|