alexander-lazarin commited on
Commit
836a3b7
1 Parent(s): 98406b5

Fix password, i.e. store as a secret

Browse files
Files changed (2) hide show
  1. Fashion_MVP_v0_0_2.ipynb +2 -0
  2. app.py +2 -0
Fashion_MVP_v0_0_2.ipynb CHANGED
@@ -266,9 +266,11 @@
266
  "if IN_COLAB:\n",
267
  " OPEN_AI_KEY = userdata.get('OPEN_AI_KEY')\n",
268
  " MJ_AUTH = userdata.get('MJ_AUTH')\n",
 
269
  "else:\n",
270
  " OPEN_AI_KEY = os.environ['OPEN_AI_KEY']\n",
271
  " MJ_AUTH = os.environ['MJ_AUTH']\n",
 
272
  "\n",
273
  "client = OpenAI(\n",
274
  " api_key=OPEN_AI_KEY, # 'OPENAI_API_KEY'\n",
 
266
  "if IN_COLAB:\n",
267
  " OPEN_AI_KEY = userdata.get('OPEN_AI_KEY')\n",
268
  " MJ_AUTH = userdata.get('MJ_AUTH')\n",
269
+ " PASSWORD = userdata.get('FMVP_PASS')\n",
270
  "else:\n",
271
  " OPEN_AI_KEY = os.environ['OPEN_AI_KEY']\n",
272
  " MJ_AUTH = os.environ['MJ_AUTH']\n",
273
+ " PASSWORD = os.environ['PASSWORD']\n",
274
  "\n",
275
  "client = OpenAI(\n",
276
  " api_key=OPEN_AI_KEY, # 'OPENAI_API_KEY'\n",
app.py CHANGED
@@ -93,9 +93,11 @@ os.makedirs('images', exist_ok=True)
93
  if IN_COLAB:
94
  OPEN_AI_KEY = userdata.get('OPEN_AI_KEY')
95
  MJ_AUTH = userdata.get('MJ_AUTH')
 
96
  else:
97
  OPEN_AI_KEY = os.environ['OPEN_AI_KEY']
98
  MJ_AUTH = os.environ['MJ_AUTH']
 
99
 
100
  client = OpenAI(
101
  api_key=OPEN_AI_KEY, # 'OPENAI_API_KEY'
 
93
  if IN_COLAB:
94
  OPEN_AI_KEY = userdata.get('OPEN_AI_KEY')
95
  MJ_AUTH = userdata.get('MJ_AUTH')
96
+ PASSWORD = userdata.get('FMVP_PASS')
97
  else:
98
  OPEN_AI_KEY = os.environ['OPEN_AI_KEY']
99
  MJ_AUTH = os.environ['MJ_AUTH']
100
+ PASSWORD = os.environ['PASSWORD']
101
 
102
  client = OpenAI(
103
  api_key=OPEN_AI_KEY, # 'OPENAI_API_KEY'