matdmiller commited on
Commit
78370f2
1 Parent(s): d36d4d3
Files changed (2) hide show
  1. app.ipynb +2 -2
  2. app.py +1 -1
app.ipynb CHANGED
@@ -377,7 +377,7 @@
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",
@@ -492,7 +492,7 @@
492
  },
493
  {
494
  "cell_type": "code",
495
- "execution_count": 38,
496
  "id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
497
  "metadata": {},
498
  "outputs": [],
 
377
  "#| export\n",
378
  "def authorized(profile: gr.OAuthProfile=None) -> str:\n",
379
  " print('Profile:', profile)\n",
380
+ " if profile is not None and profile.username in [\"matdmiller\"]:\n",
381
  " return f\"{profile.username}\"\n",
382
  " else:\n",
383
  " print('Unauthorized',profile)\n",
 
492
  },
493
  {
494
  "cell_type": "code",
495
+ "execution_count": 39,
496
  "id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
497
  "metadata": {},
498
  "outputs": [],
app.py CHANGED
@@ -233,7 +233,7 @@ 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.username in ["matdmiller"]:
237
  return f"{profile.username}"
238
  else:
239
  print('Unauthorized',profile)
 
233
  # %% app.ipynb 15
234
  def authorized(profile: gr.OAuthProfile=None) -> str:
235
  print('Profile:', profile)
236
+ if profile is not None and profile.username in ["matdmiller"]:
237
  return f"{profile.username}"
238
  else:
239
  print('Unauthorized',profile)