Skip to content

Commit

Permalink
add code to get TEXT_API_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartleeks committed Nov 24, 2021
1 parent ed8bac1 commit f1b1192
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
"outputs": [],
"source": [
"import os\n",
"\n",
"if os.environ.get(\"AZURE_SERVICE\", None) == \"Microsoft.ProjectArcadia\":\n",
" from pyspark.sql import SparkSession\n",
" spark = SparkSession.builder.getOrCreate()\n",
" from notebookutils.mssparkutils.credentials import getSecret\n",
" os.environ['TEXT_API_KEY'] = getSecret(\"mmlspark-keys\", \"mmlspark-cs-key\")\n",
"\n",
"#put your service keys here\n",
"key = os.environ['TEXT_API_KEY']"
]
},
Expand Down

0 comments on commit f1b1192

Please sign in to comment.