File size: 595 Bytes
b54655d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from datasets import load_dataset
import os

# Define the dataset repository and the local directory
dataset_repo = "westbrook/English_Accent_DataSet"
save_directory = "English_Accent_DataSet_Local"

# Create the directory if it doesn't exist
if not os.path.exists(save_directory):
    os.makedirs(save_directory)

# Download the dataset and save it to the local directory
try:
    dataset = load_dataset(dataset_repo, cache_dir=save_directory)
    print(f"Dataset '{dataset_repo}' downloaded and saved to '{save_directory}'")
except Exception as e:
    print(f"Error downloading dataset: {e}")