Check if dir exists before creating

This commit is contained in:
ebolam 2022-10-19 11:19:04 -04:00
parent 73865ba066
commit d588dc0096
2 changed files with 8 additions and 4 deletions

View File

@ -78,8 +78,10 @@
" drive.mount('/content/drive/')\n",
"else:\n",
" import os\n",
" os.mkdir(\"/content/drive\")\n",
" os.mkdir(\"/content/drive/MyDrive/\")\n",
" if not os.path.exists(\"/content/drive\"):\n",
" os.mkdir(\"/content/drive\")\n",
" if not os.path.exists(\"/content/drive/MyDrive/\"):\n",
" os.mkdir(\"/content/drive/MyDrive/\")\n",
"\n",
"if Model == \"Nerys 2.7B\":\n",
" Model = \"KoboldAI/fairseq-dense-2.7B-Nerys\"\n",

View File

@ -84,8 +84,10 @@
" drive.mount('/content/drive/')\n",
"else:\n",
" import os\n",
" os.mkdir(\"/content/drive\")\n",
" os.mkdir(\"/content/drive/MyDrive/\")\n",
" if not os.path.exists(\"/content/drive\"):\n",
" os.mkdir(\"/content/drive\")\n",
" if not os.path.exists(\"/content/drive/MyDrive/\"):\n",
" os.mkdir(\"/content/drive/MyDrive/\")\n",
"\n",
"if Model == \"Janeway 13B\":\n",
" Model = \"KoboldAI/fairseq-dense-13B-Janeway\"\n",