Rathapoom commited on
Commit
db3aeff
·
verified ·
1 Parent(s): ae498da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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: