Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,10 @@ import gradio as gr
|
|
| 2 |
import os
|
| 3 |
from openai import OpenAI
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
def converse(x, y, z):
|
| 6 |
return z
|
| 7 |
|
|
@@ -23,9 +27,7 @@ messages = [{
|
|
| 23 |
}]
|
| 24 |
|
| 25 |
|
| 26 |
-
|
| 27 |
-
#openai.api_key = config.OPENAI_API_KEY
|
| 28 |
-
openai.api_key = os.environ['OPENAI_API_KEY']
|
| 29 |
|
| 30 |
def provide_suggestions(user_message, history):
|
| 31 |
global messages
|
|
|
|
| 2 |
import os
|
| 3 |
from openai import OpenAI
|
| 4 |
|
| 5 |
+
# Set your OpenAI API key
|
| 6 |
+
#openai.api_key = config.OPENAI_API_KEY
|
| 7 |
+
OpenAI.api_key = os.environ['OPENAI_API_KEY']
|
| 8 |
+
|
| 9 |
def converse(x, y, z):
|
| 10 |
return z
|
| 11 |
|
|
|
|
| 27 |
}]
|
| 28 |
|
| 29 |
|
| 30 |
+
|
|
|
|
|
|
|
| 31 |
|
| 32 |
def provide_suggestions(user_message, history):
|
| 33 |
global messages
|