Spaces:
Sleeping
Sleeping
Commit
·
f19f22f
1
Parent(s):
c1779e1
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,11 +12,16 @@ from hfserver import HuggingFaceDatasetSaver, HuggingFaceDatasetJSONSaver
|
|
| 12 |
# download data from huggingface dataset
|
| 13 |
# dataset = load_dataset("quantumiracle-git/robotinder-data")
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
def video_identity(video):
|
| 22 |
return video
|
|
@@ -25,7 +30,6 @@ def nan():
|
|
| 25 |
return None
|
| 26 |
|
| 27 |
FORMAT = ['mp4', 'gif'][1]
|
| 28 |
-
VIDEO_PATH = 'robotinder-data'
|
| 29 |
|
| 30 |
def get_huggingface_dataset():
|
| 31 |
try:
|
|
|
|
| 12 |
# download data from huggingface dataset
|
| 13 |
# dataset = load_dataset("quantumiracle-git/robotinder-data")
|
| 14 |
|
| 15 |
+
LOAD_DATA_GOOGLE_DRIVE = True
|
| 16 |
+
if LOAD_DATA_GOOGLE_DRIVE: # download data from google drive
|
| 17 |
+
url = 'https://drive.google.com/drive/folders/1JuNQS4R7axTezWj1x4KRAuRt_L26ApxA?usp=sharing' # './processed/' folder in google drive
|
| 18 |
+
output = './'
|
| 19 |
+
id = url.split('/')[-1]
|
| 20 |
+
os.system(f"gdown --id {id} -O {output} --folder --no-cookies --remaining-ok")
|
| 21 |
+
VIDEO_PATH = 'processed'
|
| 22 |
+
else: # local data
|
| 23 |
+
VIDEO_PATH = 'robotinder-data'
|
| 24 |
+
|
| 25 |
|
| 26 |
def video_identity(video):
|
| 27 |
return video
|
|
|
|
| 30 |
return None
|
| 31 |
|
| 32 |
FORMAT = ['mp4', 'gif'][1]
|
|
|
|
| 33 |
|
| 34 |
def get_huggingface_dataset():
|
| 35 |
try:
|