Spaces:
Build error
Build error
updated app.py to correct api_key
Browse files
app.py
CHANGED
|
@@ -3,6 +3,9 @@ import time
|
|
| 3 |
import gradio as gr
|
| 4 |
import json
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
# Initialize the OpenAI client
|
| 7 |
client = OpenAI(api_key=api_key)
|
| 8 |
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
import json
|
| 5 |
|
| 6 |
+
# Get the API key from environment variable
|
| 7 |
+
api_key = os.environ.get('OPEN_API_KEY')
|
| 8 |
+
|
| 9 |
# Initialize the OpenAI client
|
| 10 |
client = OpenAI(api_key=api_key)
|
| 11 |
|