matdmiller commited on
Commit
d36d4d3
·
1 Parent(s): fc95a9c
Files changed (2) hide show
  1. app.ipynb +4 -2
  2. app.py +3 -1
app.ipynb CHANGED
@@ -377,8 +377,10 @@
377
  "#| export\n",
378
  "def authorized(profile: gr.OAuthProfile=None) -> str:\n",
379
  " print('Profile:', profile)\n",
380
- " if profile in [\"matdmiller\"]:\n",
381
  " return f\"{profile.username}\"\n",
 
 
382
  " return None"
383
  ]
384
  },
@@ -490,7 +492,7 @@
490
  },
491
  {
492
  "cell_type": "code",
493
- "execution_count": 37,
494
  "id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
495
  "metadata": {},
496
  "outputs": [],
 
377
  "#| export\n",
378
  "def authorized(profile: gr.OAuthProfile=None) -> str:\n",
379
  " print('Profile:', profile)\n",
380
+ " if profile.username in [\"matdmiller\"]:\n",
381
  " return f\"{profile.username}\"\n",
382
+ " else:\n",
383
+ " print('Unauthorized',profile)\n",
384
  " return None"
385
  ]
386
  },
 
492
  },
493
  {
494
  "cell_type": "code",
495
+ "execution_count": 38,
496
  "id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
497
  "metadata": {},
498
  "outputs": [],
app.py CHANGED
@@ -233,8 +233,10 @@ def get_generation_cost(input_text, tts_model_dropdown):
233
  # %% app.ipynb 15
234
  def authorized(profile: gr.OAuthProfile=None) -> str:
235
  print('Profile:', profile)
236
- if profile in ["matdmiller"]:
237
  return f"{profile.username}"
 
 
238
  return None
239
 
240
  # %% app.ipynb 16
 
233
  # %% app.ipynb 15
234
  def authorized(profile: gr.OAuthProfile=None) -> str:
235
  print('Profile:', profile)
236
+ if profile.username in ["matdmiller"]:
237
  return f"{profile.username}"
238
+ else:
239
+ print('Unauthorized',profile)
240
  return None
241
 
242
  # %% app.ipynb 16