Spaces:
Build error
Build error
Add data module and prefetched videos in Git LFS.
Browse files- .DS_Store +0 -0
- .gitattributes +1 -0
- .gitignore +3 -0
- data.py +29 -0
- data/0fd24e056447f6cd068f40ba2e41828c.index +3 -0
- data/1de5e559d3d190ca09ac3fa6b40a0138.index +3 -0
- data/265732a300bbe18c4d39df108fe0c121.index +3 -0
- data/2909574cb590231c5d1028032bd849a8.index +3 -0
- data/2f71b6c1d5c91c4b73eef2ebd05bd848.index +3 -0
- data/75617545ba72efdc9a7b2b140184a9c6.index +3 -0
- data/9c0a24aa59358ee014ded54c88eaa6c1.index +3 -0
- data/a3efa8f2e01e0964d7987e6b1e4b3b44.index +3 -0
- data/b3cf94671de7aadc22970483150aafd5.index +3 -0
- data/d0369414718aa9573ff9d009f4f61cc0.index +3 -0
.DS_Store
DELETED
Binary file (6.15 kB)
|
|
.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
data/*.index filter=lfs diff=lfs merge=lfs -text
|
.gitignore
CHANGED
@@ -130,3 +130,6 @@ dmypy.json
|
|
130 |
|
131 |
# Gradio
|
132 |
gradio_cached_examples/
|
|
|
|
|
|
|
|
130 |
|
131 |
# Gradio
|
132 |
gradio_cached_examples/
|
133 |
+
|
134 |
+
# MacOS
|
135 |
+
.DS_Store
|
data.py
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import json
|
3 |
+
import shutil
|
4 |
+
|
5 |
+
from videohash import filepath_from_url
|
6 |
+
|
7 |
+
with open('apb2022.json') as filein:
|
8 |
+
urls, videos, url2video, video2url = [], [], {}, {}
|
9 |
+
for item in json.load(filein):
|
10 |
+
urls.append(item['url'])
|
11 |
+
videos.append(item['mp4'])
|
12 |
+
url2video[item['url']] = item['mp4']
|
13 |
+
video2url[item['mp4']] = item['url']
|
14 |
+
|
15 |
+
for url in videos:
|
16 |
+
filepath = filepath_from_url(url) + '.index'
|
17 |
+
datapath = os.path.join('data', os.path.basename(filepath))
|
18 |
+
if not os.path.exists(filepath) and os.path.exists(datapath):
|
19 |
+
shutil.copyfile(datapath, filepath)
|
20 |
+
|
21 |
+
|
22 |
+
if __name__ == "__main__":
|
23 |
+
from videomatch import get_video_index
|
24 |
+
|
25 |
+
for url in videos:
|
26 |
+
get_video_index(url)
|
27 |
+
filepath = filepath_from_url(url) + '.index'
|
28 |
+
datapath = os.path.join('data', os.path.basename(filepath))
|
29 |
+
shutil.copyfile(filepath, datapath)
|
data/0fd24e056447f6cd068f40ba2e41828c.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1d304bf65b174cc6d446536e183062988d13450eb27d6e1490b6024813cfca61
|
3 |
+
size 18035
|
data/1de5e559d3d190ca09ac3fa6b40a0138.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a81da7184d4a73b80512031805e28d76adbf45c508b16cde173a9cc980104b48
|
3 |
+
size 5395
|
data/265732a300bbe18c4d39df108fe0c121.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c3d30c03a7817befd97b670f124e80bfcd2c6862a3bf3d0a57bdb7c5cad7122b
|
3 |
+
size 284155
|
data/2909574cb590231c5d1028032bd849a8.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8634dffda2a11307f55712a079bba4e0e38895f9f3836d26c5a32a051580cfcd
|
3 |
+
size 6287235
|
data/2f71b6c1d5c91c4b73eef2ebd05bd848.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4357ef337a87f67f43283e770eb444c2261f3233c64d6aef04f671a1b4237780
|
3 |
+
size 3725195
|
data/75617545ba72efdc9a7b2b140184a9c6.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c28e09d9cee38776ad698e56209573f2e3f9f67a533b10b9001a25b39e34321e
|
3 |
+
size 3305875
|
data/9c0a24aa59358ee014ded54c88eaa6c1.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:35786ba354b46631f880ff468b04f234dd0a8fff1ea159385d9a252272a53595
|
3 |
+
size 294515
|
data/a3efa8f2e01e0964d7987e6b1e4b3b44.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8ab33d752701be55ece43a841e0318a7a8eb717c9fb3c09c9e9cccd57528f65b
|
3 |
+
size 5395
|
data/b3cf94671de7aadc22970483150aafd5.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:30157e51167c48c9e9da8400bd2efb4db730cf99060ec6b958e593caf4b934ca
|
3 |
+
size 3075
|
data/d0369414718aa9573ff9d009f4f61cc0.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da68a19cadf2abcba5da6660393547599ae3a70f73c683ce236962f44a6f24ce
|
3 |
+
size 6520355
|