Spaces:
Running
Running
yuntian-deng
commited on
Commit
•
c0bd714
1
Parent(s):
a24d25f
Update app.py
Browse files
app.py
CHANGED
@@ -45,10 +45,11 @@ def predict(inputs, top_p, temperature, chat_counter, chatbot, history, request:
|
|
45 |
"presence_penalty":0,
|
46 |
"frequency_penalty":0,
|
47 |
}
|
48 |
-
|
|
|
49 |
headers = {
|
50 |
"Content-Type": "application/json",
|
51 |
-
"Authorization": f"Bearer {
|
52 |
"Headers": f"{request.kwargs['headers']}"
|
53 |
}
|
54 |
|
|
|
45 |
"presence_penalty":0,
|
46 |
"frequency_penalty":0,
|
47 |
}
|
48 |
+
OPENAI_API_KEY = random.choice(OPENAI_API_KEYS)
|
49 |
+
print (OPENAI_API_KEY)
|
50 |
headers = {
|
51 |
"Content-Type": "application/json",
|
52 |
+
"Authorization": f"Bearer {OPENAI_API_KEY}",
|
53 |
"Headers": f"{request.kwargs['headers']}"
|
54 |
}
|
55 |
|