Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,8 @@ import gradio as gr
|
|
2 |
import openai
|
3 |
|
4 |
# ใส่ API Key
|
5 |
-
openai.api_key = OPENAI_API_KEY
|
|
|
6 |
|
7 |
def generate_response(prompt):
|
8 |
try:
|
|
|
2 |
import openai
|
3 |
|
4 |
# ใส่ API Key
|
5 |
+
openai.api_key = os.getenv("OPENAI_API_KEY")
|
6 |
+
|
7 |
|
8 |
def generate_response(prompt):
|
9 |
try:
|