Spaces:
Sleeping
Sleeping
File size: 739 Bytes
4188c34 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import shutil
import os
try:
print("Importing nltk files...")
# Define source and destination paths
source_folder = '/home/user/app/nltk_data'
destination_folder = '/home/user/nltk_data'
# Ensure the destination folder exists, create if it doesn't
os.makedirs(destination_folder, exist_ok=True)
# Move the source folder to the destination
shutil.move(source_folder, destination_folder)
print(f"NLTK folder moved to {destination_folder}")
except FileNotFoundError as fnf_error:
print(f"Error: Source folder not found. {fnf_error}")
except PermissionError as perm_error:
print(f"Error: Permission denied. {perm_error}")
except Exception as e:
print(f"An unexpected error occurred: {e}")
|