gamedevelop commited on
Commit
dc41909
·
verified ·
1 Parent(s): 048e554

Update chatcode/cloud_training.ipynb

Browse files
Files changed (1) hide show
  1. chatcode/cloud_training.ipynb +1 -1
chatcode/cloud_training.ipynb CHANGED
@@ -70,7 +70,7 @@
70
  "cell_type": "code",
71
  "id": "cell-06",
72
  "metadata": {},
73
- "source": "if not DRY_RUN:\n from google.colab import userdata\n from huggingface_hub import HfApi, snapshot_download\n os.environ[\"HF_TOKEN\"] = userdata.get(\"HF_TOKEN\")\n revision = SOURCE_REVISION or HfApi().model_info(SOURCE_REPO).sha\n source_dir = Path(snapshot_download(SOURCE_REPO, revision=revision, allow_patterns=[\n \"app.py\", \"chat.py\", \"LICENSE*\", \"chatcode/*.py\", \"chatcode/*.json\", \"chatcode/*.txt\", \"chatcode/*.md\"]))\n assert (source_dir / \"chatcode/articles.py\").is_file(), \"This source commit predates article support.\"\n subprocess.run([str(cloud_python), \"-m\", \"pip\", \"install\", \"-r\",\n str(source_dir / \"chatcode/requirements-cloud.txt\")], check=True)\n subprocess.run([str(cloud_python), \"-m\", \"pip\", \"check\"], check=True)\n print(\"Source commit:\", revision)\nelse:\n print(\"Skipped: private Hub download and authentication. No token requested.\")\n",
74
  "execution_count": 3,
75
  "outputs": [
76
  {
 
70
  "cell_type": "code",
71
  "id": "cell-06",
72
  "metadata": {},
73
+ "source": "if not DRY_RUN:\n from google.colab import userdata\n from huggingface_hub import HfApi, snapshot_download\n os.environ[\"HF_TOKEN\"] = userdata.get(\"HF_TOKEN\")\n revision = HfApi().model_info(SOURCE_REPO, revision=SOURCE_REVISION or \"main\").sha\n source_dir = Path(snapshot_download(SOURCE_REPO, revision=revision, allow_patterns=[\n \"app.py\", \"chat.py\", \"LICENSE*\", \"chatcode/*.py\", \"chatcode/*.json\", \"chatcode/*.txt\", \"chatcode/*.md\"]))\n assert (source_dir / \"chatcode/articles.py\").is_file(), \"This source commit predates article support.\"\n subprocess.run([str(cloud_python), \"-m\", \"pip\", \"install\", \"-r\",\n str(source_dir / \"chatcode/requirements-cloud.txt\")], check=True)\n subprocess.run([str(cloud_python), \"-m\", \"pip\", \"check\"], check=True)\n print(\"Source commit:\", revision)\nelse:\n print(\"Skipped: private Hub download and authentication. No token requested.\")\n",
74
  "execution_count": 3,
75
  "outputs": [
76
  {