Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
import os
|
| 4 |
|
| 5 |
# Retrieve the API key from the environment variable
|
| 6 |
api_key = os.environ.get('SECRET_TOKEN')
|
| 7 |
|
| 8 |
# Initialize the OpenAI client with your API key
|
| 9 |
-
client =
|
| 10 |
|
| 11 |
# Store conversation history
|
| 12 |
conversation_history = []
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import openai
|
| 3 |
import os
|
| 4 |
|
| 5 |
# Retrieve the API key from the environment variable
|
| 6 |
api_key = os.environ.get('SECRET_TOKEN')
|
| 7 |
|
| 8 |
# Initialize the OpenAI client with your API key
|
| 9 |
+
client = openai.api_key = api_key
|
| 10 |
|
| 11 |
# Store conversation history
|
| 12 |
conversation_history = []
|