Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,13 +23,14 @@ def download_dataset_file(dataset_id, local_dir):
|
|
23 |
cache_file_info = dataset.cache_files
|
24 |
print(f"Cache File Info: {cache_file_info}\n")
|
25 |
|
26 |
-
filename = cache_file_info['test'][0]['filename']
|
27 |
-
snapshot_id = filename.split('/')[-2]
|
28 |
-
dataset_name = filename.split('/')[-5]
|
29 |
-
dataset_name = dataset_name.replace('___', '--')
|
30 |
-
base_path = os.path.join('/home/user/.cache/huggingface/hub', 'datasets--' + dataset_name)
|
31 |
-
snapshot_path = os.path.join(base_path, "snapshots", snapshot_id)
|
32 |
-
print(f"snapshot_path: {snapshot_path}")
|
|
|
33 |
|
34 |
contents = os.listdir(snapshot_path)
|
35 |
print("Contents of snapshot path:")
|
|
|
23 |
cache_file_info = dataset.cache_files
|
24 |
print(f"Cache File Info: {cache_file_info}\n")
|
25 |
|
26 |
+
# filename = cache_file_info['test'][0]['filename']
|
27 |
+
# snapshot_id = filename.split('/')[-2]
|
28 |
+
# dataset_name = filename.split('/')[-5]
|
29 |
+
# dataset_name = dataset_name.replace('___', '--')
|
30 |
+
# base_path = os.path.join('/home/user/.cache/huggingface/hub', 'datasets--' + dataset_name)
|
31 |
+
# snapshot_path = os.path.join(base_path, "snapshots", snapshot_id)
|
32 |
+
# print(f"snapshot_path: {snapshot_path}")
|
33 |
+
snapshot_path = "/home/user/.cache/huggingface/hub/datasets--350016z--flores_plus_taiwanese/snapshots/9a8fe738903c9ab08620db4553c582376bcdd64f"
|
34 |
|
35 |
contents = os.listdir(snapshot_path)
|
36 |
print("Contents of snapshot path:")
|