Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import fitz
|
| 4 |
-
from openai import
|
| 5 |
import re
|
| 6 |
|
| 7 |
-
client =
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
class ResumeAnalyser:
|
| 10 |
def __init__(self):
|
| 11 |
pass
|
|
@@ -62,7 +64,7 @@ class ResumeAnalyser:
|
|
| 62 |
|
| 63 |
# Call OpenAI GPT-3.5-turbo
|
| 64 |
chat_completion = client.chat.completions.create(
|
| 65 |
-
model = "
|
| 66 |
messages = conversation,
|
| 67 |
max_tokens=300,
|
| 68 |
temperature=0
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import fitz
|
| 4 |
+
from openai import AzureOpenAI
|
| 5 |
import re
|
| 6 |
|
| 7 |
+
client = AzureOpenAI(api_key=os.getenv("AZURE_OPENAI_KEY"),
|
| 8 |
+
api_version="2023-07-01-preview",
|
| 9 |
+
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
|
| 10 |
+
)
|
| 11 |
class ResumeAnalyser:
|
| 12 |
def __init__(self):
|
| 13 |
pass
|
|
|
|
| 64 |
|
| 65 |
# Call OpenAI GPT-3.5-turbo
|
| 66 |
chat_completion = client.chat.completions.create(
|
| 67 |
+
model = "ChatGPT",
|
| 68 |
messages = conversation,
|
| 69 |
max_tokens=300,
|
| 70 |
temperature=0
|