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}")