diff --git a/colab/GPU.ipynb b/colab/GPU.ipynb index d8971127..8c76b5ed 100644 --- a/colab/GPU.ipynb +++ b/colab/GPU.ipynb @@ -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", diff --git a/colab/TPU.ipynb b/colab/TPU.ipynb index 6e640e32..efdfa5c4 100644 --- a/colab/TPU.ipynb +++ b/colab/TPU.ipynb @@ -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",