matdmiller commited on
Commit
ba49b3c
·
1 Parent(s): 6cc7dd6
Files changed (1) hide show
  1. app.ipynb +5 -4
app.ipynb CHANGED
@@ -253,7 +253,8 @@
253
  "source": [
254
  "#| export\n",
255
  "def create_speech2(input_text, model='tts-1', voice='alloy', profile: gr.OAuthProfile|None=None, progress=gr.Progress(), **kwargs):\n",
256
- " assert authorized(profile) is not None,'Unauthorized M'\n",
 
257
  " start = datetime.now()\n",
258
  " # Split the input text into chunks\n",
259
  " chunks = split_text(input_text)\n",
@@ -295,7 +296,7 @@
295
  "source": [
296
  "#| export\n",
297
  "def create_speech(input_text, model='tts-1', voice='alloy', profile: gr.OAuthProfile|None=None, progress=gr.Progress()):\n",
298
- " assert authorized(profile) is not None,'Unauthorized M'\n",
299
  " # Split the input text into chunks\n",
300
  " chunks = split_text(input_text)\n",
301
  "\n",
@@ -375,7 +376,7 @@
375
  "source": [
376
  "#| export\n",
377
  "def authorized(profile: gr.OAuthProfile=None) -> str:\n",
378
- " print(profile)\n",
379
  " if profile in [\"matdmiller\"]:\n",
380
  " return f\"{profile.username}\"\n",
381
  " return None"
@@ -489,7 +490,7 @@
489
  },
490
  {
491
  "cell_type": "code",
492
- "execution_count": 35,
493
  "id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
494
  "metadata": {},
495
  "outputs": [],
 
253
  "source": [
254
  "#| export\n",
255
  "def create_speech2(input_text, model='tts-1', voice='alloy', profile: gr.OAuthProfile|None=None, progress=gr.Progress(), **kwargs):\n",
256
+ " print('cs2-profile:',profile)\n",
257
+ " assert authorized() is not None,'Unauthorized M'\n",
258
  " start = datetime.now()\n",
259
  " # Split the input text into chunks\n",
260
  " chunks = split_text(input_text)\n",
 
296
  "source": [
297
  "#| export\n",
298
  "def create_speech(input_text, model='tts-1', voice='alloy', profile: gr.OAuthProfile|None=None, progress=gr.Progress()):\n",
299
+ " assert authorized() is not None,'Unauthorized M'\n",
300
  " # Split the input text into chunks\n",
301
  " chunks = split_text(input_text)\n",
302
  "\n",
 
376
  "source": [
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"
 
490
  },
491
  {
492
  "cell_type": "code",
493
+ "execution_count": 36,
494
  "id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
495
  "metadata": {},
496
  "outputs": [],