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

Update chatcode/build_notebook.py

Browse files
Files changed (1) hide show
  1. chatcode/build_notebook.py +1 -1
chatcode/build_notebook.py CHANGED
@@ -77,7 +77,7 @@ The model and datasets have their own pinned revisions in the configuration.
77
  from google.colab import userdata
78
  from huggingface_hub import HfApi, snapshot_download
79
  os.environ["HF_TOKEN"] = userdata.get("HF_TOKEN")
80
- revision = SOURCE_REVISION or HfApi().model_info(SOURCE_REPO).sha
81
  source_dir = Path(snapshot_download(SOURCE_REPO, revision=revision, allow_patterns=[
82
  "app.py", "chat.py", "LICENSE*", "chatcode/*.py", "chatcode/*.json", "chatcode/*.txt", "chatcode/*.md"]))
83
  assert (source_dir / "chatcode/articles.py").is_file(), "This source commit predates article support."
 
77
  from google.colab import userdata
78
  from huggingface_hub import HfApi, snapshot_download
79
  os.environ["HF_TOKEN"] = userdata.get("HF_TOKEN")
80
+ revision = HfApi().model_info(SOURCE_REPO, revision=SOURCE_REVISION or "main").sha
81
  source_dir = Path(snapshot_download(SOURCE_REPO, revision=revision, allow_patterns=[
82
  "app.py", "chat.py", "LICENSE*", "chatcode/*.py", "chatcode/*.json", "chatcode/*.txt", "chatcode/*.md"]))
83
  assert (source_dir / "chatcode/articles.py").is_file(), "This source commit predates article support."