Spaces:
Build error
Build error
Merge branch 'main' into restructure
Browse files- .DS_Store +0 -0
- Matching Exploration.ipynb +0 -0
- app.py +3 -1
- clip_data.ipynb +3 -3
- requirements.txt +4 -2
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
Matching Exploration.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
app.py
CHANGED
@@ -44,7 +44,7 @@ def move_video_to_tempdir(input_dir, filename):
|
|
44 |
|
45 |
def download_video_from_url(url):
|
46 |
"""Download video from url or return md5 hash as video name"""
|
47 |
-
filename =
|
48 |
if not os.path.exists(filename):
|
49 |
with (urllib.request.urlopen(url)) as f, open(filename, 'wb') as fileout:
|
50 |
fileout.write(f.read())
|
@@ -95,6 +95,8 @@ def index_hashes_for_video(url, is_file = False):
|
|
95 |
logging.info(f"Index {filename}.index has in total {binary_index.ntotal} frames")
|
96 |
return binary_index
|
97 |
|
|
|
|
|
98 |
hash_vectors = np.array([x['hash'] for x in compute_hashes(VideoFileClip(filename))])
|
99 |
logging.info(f"Computed hashes for {hash_vectors.shape} frames.")
|
100 |
|
|
|
44 |
|
45 |
def download_video_from_url(url):
|
46 |
"""Download video from url or return md5 hash as video name"""
|
47 |
+
filename = filename_from_url(url)
|
48 |
if not os.path.exists(filename):
|
49 |
with (urllib.request.urlopen(url)) as f, open(filename, 'wb') as fileout:
|
50 |
fileout.write(f.read())
|
|
|
95 |
logging.info(f"Index {filename}.index has in total {binary_index.ntotal} frames")
|
96 |
return binary_index
|
97 |
|
98 |
+
download_video_from_url(url)
|
99 |
+
|
100 |
hash_vectors = np.array([x['hash'] for x in compute_hashes(VideoFileClip(filename))])
|
101 |
logging.info(f"Computed hashes for {hash_vectors.shape} frames.")
|
102 |
|
clip_data.ipynb
CHANGED
@@ -395,7 +395,7 @@
|
|
395 |
],
|
396 |
"metadata": {
|
397 |
"kernelspec": {
|
398 |
-
"display_name": "Python 3.9.
|
399 |
"language": "python",
|
400 |
"name": "python3"
|
401 |
},
|
@@ -409,12 +409,12 @@
|
|
409 |
"name": "python",
|
410 |
"nbconvert_exporter": "python",
|
411 |
"pygments_lexer": "ipython3",
|
412 |
-
"version": "3.9.
|
413 |
},
|
414 |
"orig_nbformat": 4,
|
415 |
"vscode": {
|
416 |
"interpreter": {
|
417 |
-
"hash": "
|
418 |
}
|
419 |
}
|
420 |
},
|
|
|
395 |
],
|
396 |
"metadata": {
|
397 |
"kernelspec": {
|
398 |
+
"display_name": "Python 3.9.7 ('base')",
|
399 |
"language": "python",
|
400 |
"name": "python3"
|
401 |
},
|
|
|
409 |
"name": "python",
|
410 |
"nbconvert_exporter": "python",
|
411 |
"pygments_lexer": "ipython3",
|
412 |
+
"version": "3.9.7"
|
413 |
},
|
414 |
"orig_nbformat": 4,
|
415 |
"vscode": {
|
416 |
"interpreter": {
|
417 |
+
"hash": "35ac539f20c4edc7c4b10c8a5969be22a35cbd7bf12b66c83932160e8a573333"
|
418 |
}
|
419 |
}
|
420 |
},
|
requirements.txt
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
gradio==3.1.7
|
2 |
moviepy==1.0.3
|
3 |
imagehash==4.2.1
|
4 |
-
pandas==1.
|
5 |
faiss-cpu==1.7.2
|
6 |
-
Pillow==9.2.0
|
|
|
|
|
|
1 |
gradio==3.1.7
|
2 |
moviepy==1.0.3
|
3 |
imagehash==4.2.1
|
4 |
+
pandas==1.3.5
|
5 |
faiss-cpu==1.7.2
|
6 |
+
Pillow==9.2.0
|
7 |
+
kats==0.2.0
|
8 |
+
seaborn==0.12.0
|