coconutkim commited on
Commit
b3d2ffa
·
verified ·
1 Parent(s): 9592cb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -1,9 +1,13 @@
1
  from openai import OpenAI
2
- from google.colab import userdata
3
  import os
4
 
5
- openai_key = userdata.get('OPENAI_API_KEY')
6
- SD_API_KEY = userdata.get('SD_API_KEY')
 
 
 
 
7
 
8
  os.environ["OPENAI_API_KEY"] = openai_key
9
  # 자동 프롬프트 생성
 
1
  from openai import OpenAI
2
+ # from google.colab import userdata
3
  import os
4
 
5
+ # openai_key = userdata.get('OPENAI_API_KEY')
6
+ # SD_API_KEY = userdata.get('SD_API_KEY')
7
+
8
+ # API 키를 환경 변수에서 읽어오기
9
+ openai_key = os.environ.get('OPENAI_API_KEY')
10
+ SD_API_KEY = os.environ.get('SD_API_KEY')
11
 
12
  os.environ["OPENAI_API_KEY"] = openai_key
13
  # 자동 프롬프트 생성