weihan1 commited on
Commit
cf8a617
·
verified ·
1 Parent(s): ccc4358

Add files using upload-large-folder tool

Browse files
upload_to_hf_large_folder.py ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Upload AiM_full_video (species folders + mp4) to a Hugging Face dataset repo."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import argparse
7
+ from pathlib import Path
8
+
9
+ from huggingface_hub import HfApi
10
+
11
+
12
+ DEFAULT_REPO_ID = "weihan1/aim"
13
+ DEFAULT_IGNORE = (
14
+ "**/*.py",
15
+ "**/*.sh",
16
+ "**/*.ytdl",
17
+ "**/.git/**",
18
+ "**/__pycache__/**",
19
+ )
20
+
21
+
22
+ def upload_dataset(
23
+ *,
24
+ repo_id: str = DEFAULT_REPO_ID,
25
+ root: Path | None = None,
26
+ token: str | bool | None = None,
27
+ commit_message: str | None = None,
28
+ ignore_patterns: tuple[str, ...] | list[str] | None = None,
29
+ ) -> None:
30
+ """Create the dataset repo if needed, then upload ``root`` preserving subpaths.
31
+
32
+ ``root`` should be the directory that contains ``dog/``, ``fox/``, etc.
33
+ Authentication uses the Hugging Face token from ``token``, or the
34
+ environment / cached login when ``token`` is None.
35
+ """
36
+ root = root or Path(__file__).resolve().parent
37
+ root = root.resolve()
38
+ if not root.is_dir():
39
+ raise FileNotFoundError(f"root is not a directory: {root}")
40
+
41
+ api = HfApi(token=token)
42
+ api.create_repo(repo_id, repo_type="dataset", exist_ok=True)
43
+
44
+ ignores: list[str] = list(ignore_patterns or DEFAULT_IGNORE)
45
+ api.upload_large_folder(
46
+ repo_id=repo_id,
47
+ repo_type="dataset",
48
+ folder_path=str(root),
49
+ )
50
+
51
+
52
+ def main() -> None:
53
+ p = argparse.ArgumentParser(description=__doc__)
54
+ p.add_argument("--repo-id", default=DEFAULT_REPO_ID, help="HF dataset repo id")
55
+ p.add_argument(
56
+ "--root",
57
+ type=Path,
58
+ default=Path(__file__).resolve().parent,
59
+ help="Species folder",
60
+ )
61
+ p.add_argument(
62
+ "--token",
63
+ default=None,
64
+ help="HF token (default: HF_TOKEN env or cached `hf auth login`)",
65
+ )
66
+ args = p.parse_args()
67
+
68
+ upload_dataset(
69
+ repo_id=args.repo_id,
70
+ root=args.root,
71
+ token=args.token,
72
+ )
73
+ print(f"Uploaded {args.root.resolve()} -> {args.repo_id} (dataset)")
74
+
75
+
76
+ if __name__ == "__main__":
77
+ main()
zebra/-nRjJY6pct8.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:335160b7c00f624da180dbeb73b08dcd5e0f893decbef60358a39f1affac6ca0
3
+ size 13036976
zebra/3r3PhugZeMg.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff6150d8517bd4f62b82077703522fa7ee1f9068eba9ac5038f4561f328f30f3
3
+ size 42360225
zebra/5u7Yr6hnI3A.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c50d5e9cf399dab80d922ac60a26f2ecdf4bff1a2a3d04867a524062cbc6f00
3
+ size 9660613
zebra/7-_cLcGqEfI.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e4d31e8e6d87616e2c08411ce194403359f05d139e75964663036f91f8d1c2c
3
+ size 5139136
zebra/AEq76YTjn3M.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79336129717c0977db713d586b0015acbdf60ce4585ce208d482df628029a140
3
+ size 22297451
zebra/CHI3ClP0sEo.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de64bc7c179de74e6e375c7975d95b010b3228932f8c43c34f342c5d8d19db53
3
+ size 48223850
zebra/DQgL6bGsg6w.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39966e083a4a3e4fb3a033d498f8ed91db4a8a38c557561eba6696fac4b7a278
3
+ size 108804009
zebra/E9juknAFqfk.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fea5a57fb8b3f5c117ed838aacbf6e352712bb2899b4b1ad951fffef848f2217
3
+ size 59196575
zebra/Ez7Zwm8MJB8.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:582690c30039e19f3308bf9493866ffd1a3935f71ad39941852f635ed8b133c9
3
+ size 4369318
zebra/H53yfOZNNaU.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06cd9ff78d6a953bc71f13a15d5e27574682d8d62fd6c565225f190e6cf43d06
3
+ size 147227506
zebra/I5TZNqhOaUk.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f8c14bb84bc7d4823b808f853a7c8a03ca13b7b0eb4d73d31eb536a64922b01
3
+ size 17412260
zebra/JsyHvY0rtp4.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a1eaaadc2a80996b35374b453eb2cbdc3f4a6210e2f37b993e16b1f81b67560
3
+ size 96689586
zebra/LEvx58eBFTA.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afb172b3d46276e78a5a9182e65fe8edf01a836fbded174ab81fef981e4f906a
3
+ size 13089955
zebra/NivLsWL5h8c.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f49d4c549ceb65fbac1daa74b742d11ec8afc3862e6e3c6eb655b0e4321d24c
3
+ size 6956526
zebra/OME5q-VZzfA.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44e2b9749a1408f3b305647bbcd123eb3320fc1eede45f0b8602944556b0d567
3
+ size 27665544
zebra/Oa5UHxzrALc.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:509cc607008e3bec02718a60ae4b1b7b770014b046315dfb49ec435df4ce609a
3
+ size 62508037
zebra/OvjDv2P805E.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23862b483699b32596d1c7cb3027b62fa68d13285e3704d4f918f9b0b2a83d25
3
+ size 50550514
zebra/Qlo0soi0yOM.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:205e92278c5e0d17a782d15fcf20e26518c5fba41408e39a7da3f20fd4e361e5
3
+ size 36412392
zebra/Qrnjs07Pjn8.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a77b0bc16a0ddc04cd9f29dbc2eaf318fc6c89e71096d14a5e2e753af293d624
3
+ size 22774606
zebra/R85vPIbSuBE.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03de16a6fa0370ad68875f988f03c49e8158bf16622ecd5ddb16b3306bcc267e
3
+ size 51643468
zebra/ROWwzmJHhY8.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d636f4cf12e7f8962aa9592f1a38172d73e09d08983b8a6f09a99ad896723e12
3
+ size 3149901
zebra/T5L4--pOAKA.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca64d1f5ed325037fb648c1c0974c2bb008b9e7ead87c823b03731d057783199
3
+ size 78176587
zebra/VFoqoMWZcy4.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3537ddc3e209150e3a7878983fe843a14e6464ca62c0f4b39896f243b6a5f0ab
3
+ size 14576523
zebra/VY6PB0sH9LA.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8afc4b595aec1e33f053a96760bd7810b05cf436ec4fa83e1c0b85281c4a521e
3
+ size 31696602
zebra/XHRV_3UqsPY.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e1094b3d037172c3183b1fe76efa86ba055491cb8abc13471c7d738dc01e21c
3
+ size 21178880
zebra/_QcLCylrGaU.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b13050b49c1a7c0023a2a627d1975ac8a6687c461359993f779bc79216d2d7e
3
+ size 16852875
zebra/a62dV0nZd7A.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f13861060d4b60bdd6151a032bb18ab0e4b352e91778dcf64fac6aacd0c8a91
3
+ size 17396803
zebra/cY_oF-JYRHo.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:caf8fe9f85fbd9bb7f617696aceb9683044d19a347d3d77ef48bed51f462fdcf
3
+ size 28800192
zebra/cePx-6RVhyk.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bf52c4211d3443d9495a4d1a374efa0563db6dca6a9b9a51cfbfd916be150e6
3
+ size 5495031
zebra/cxupD_LhO1U.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1dc38a243e1a1c36126109ce07d10c14582438ba5c4d853076ab77fb4ea23ea9
3
+ size 35566474
zebra/gQXk4-Gb1q4.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:104d962a949f60ab09e88de793db58bbfde7eefad37d3ff23ede5d6a430e5fdb
3
+ size 49833633
zebra/iktC6vwzIeM.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f88d791f3fc94a74cede934beb8feda2bda18950d5441ecede516c7d1e04c9bc
3
+ size 95336379
zebra/ivsFl-229ig.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac9fd7673f21cb34dd3b70a284e7fba8889c0e09badf27c3bff7a38c6fabc4b9
3
+ size 26319328
zebra/jP1VBqYLpwA.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd8c8576ea461f6cbc0c463a44d52a66cfd8915588bf5e3b648a754f0b9f910b
3
+ size 10110540
zebra/lkNFnmw499o.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a52a32a46c9a9eb4a50a3179d935f58d12e298406332ff1c6d78f42201df477
3
+ size 2671058
zebra/n6jt0drnw7w.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9fc8ca8db04311b66896ca3c7e27dcd4d0ffa5609b6cd725a8a8af2c906bf80
3
+ size 79595174
zebra/npPn7kVEX2M.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9387f08744cbce85697d4dc490a403c6efa771e5d2e0f969100221ac1c32baae
3
+ size 138830959
zebra/nzBGo4Nonjs.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88bbce90157e01405ef2d4b32151f4584c641751b0a92e538ef688494b869a54
3
+ size 8522370
zebra/oFrCNefS4Ec.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9793afe47aae98134faf204782bb7de3fa033eff77d9d65edefff4019e9bb35d
3
+ size 30920230
zebra/oLASCFh-JxQ.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac77e6dad4fbd5e5785502b384deab9a5379d2e69147e3bd36b1bfd117cb1dad
3
+ size 14625287
zebra/qHdZSqMif5k.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:117b7cccaedf27c234248a009b9e5016b6c503b47ecdea42be02ad74d3ec5503
3
+ size 30515539
zebra/tKREj3-W6fg.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20e6d86a0860662c52066555c1f6503974cc6424c13964b61144ed65787f48ee
3
+ size 12206837
zebra/t_HS9rTVtW4.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:697dc5e860d739d75a9c15016168e5ef80f1fe5f3911dae3d749f7b5fa544693
3
+ size 51451158
zebra/tnvfkTbC9rs.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37632b1e9fbf3874d85c6250f8f2aae2ab48817493ad468101eabc0730766abe
3
+ size 12880834
zebra/uK2IIYgz09w.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f93157e5c56ef7803d4c0a34c7cd8bc7b0790714008e78f3734820bf9c0872b7
3
+ size 6609916
zebra/uZyEpUCsBo0.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23bce020a7fb1c16e1c00a315625c4fe935fa051f06f85c3eba123a4317c1206
3
+ size 70912049
zebra/uqvTL3of0aI.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca3a54690018ed44b026fb05f8db1685db454cea53dc22d90f299feccf45d503
3
+ size 8580821
zebra/wzZ4n4bg7T4.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:230c021764f2cc871e3d1d5c825f0263b51f2a65126b10203fba375235ab1b39
3
+ size 85225795
zebra/xN5j2iWfaCg.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bef458589e02d5430b12cdd6ac897a0e792df983e2bb2ebc663317e08217c3e7
3
+ size 3967773