Spaces:
Build error
Build error
Update app.py
#3
by
KarthickAdopleAI
- opened
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,
|