Skip to content

Commit

Permalink
Merge pull request khmorad#33 from khmorad/ipynb
Browse files Browse the repository at this point in the history
Ensured API key is not viewable by third parties
  • Loading branch information
tkpp26 authored Sep 5, 2024
2 parents 811b654 + 9b203b7 commit a155ede
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions clothingRecommendationv2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,19 @@
"outputs": [],
"source": [
"from google.colab import files\n",
"# Upload kaggle.json\n",
"files.upload()"
"import json\n",
"import os\n",
"\n",
"# Upload kaggle.json file\n",
"uploaded = files.upload()\n",
"\n",
"# Load kaggle.json file\n",
"with open('kaggle.json') as f:\n",
" kaggle_config = json.load(f)\n",
"\n",
"# Set environment variables\n",
"os.environ['KAGGLE_USERNAME'] = kaggle_config['username']\n",
"os.environ['KAGGLE_KEY'] = kaggle_config['key']"
]
},
{
Expand Down

0 comments on commit a155ede

Please sign in to comment.