Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
import openai
|
3 |
import gradio as gr
|
4 |
|
5 |
-
openai.api_key =
|
6 |
hf_t_key = ('HF_TOKEN_KEY')
|
7 |
|
8 |
def predict(message, history):
|
@@ -10,7 +10,7 @@ def predict(message, history):
|
|
10 |
for human, assistant in history:
|
11 |
history_openai_format.append({"role": "user", "content": human })
|
12 |
history_openai_format.append({"role": "assistant", "content": assistant})
|
13 |
-
|
14 |
|
15 |
response = openai.ChatCompletion.create(
|
16 |
model='gpt-3.5-turbo',
|
|
|
2 |
import openai
|
3 |
import gradio as gr
|
4 |
|
5 |
+
openai.api_key = "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"
|
6 |
hf_t_key = ('HF_TOKEN_KEY')
|
7 |
|
8 |
def predict(message, history):
|
|
|
10 |
for human, assistant in history:
|
11 |
history_openai_format.append({"role": "user", "content": human })
|
12 |
history_openai_format.append({"role": "assistant", "content": assistant})
|
13 |
+
history_openai_format.append({"role": "user", "content": message})
|
14 |
|
15 |
response = openai.ChatCompletion.create(
|
16 |
model='gpt-3.5-turbo',
|