Created
May 8, 2021 14:54
-
-
Save morganmcg1/382db42a5e5403392d5eee0c9f1b7959 to your computer and use it in GitHub Desktop.
Upload to S3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3, os | |
my_bucket = "prosecraft-language-models" | |
folder_name = "manuscript-samples" | |
for f in files: | |
boto3.Session().resource('s3').Bucket(my_bucket).Object( | |
os.path.join(folder_name, f"{f.split('/')[-2]}_{f.split('/')[-1]}")).upload_file(f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment