Skip to content

Commit 0cc13bb

Browse files
committed
Final Update_googledrive.py_main.py
1 parent 9e0908d commit 0cc13bb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

googledrive.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
except Exception as e:
1414
print(f"An error occurred: {str(e)}")
1515

16-
17-
credentials = service_account.Credentials.from_service_account_file('cohesive-scope-400809-b4cb18e44e7b.json', scopes=['https://www.googleapis.com/auth/drive'])
16+
credentials = service_account.Credentials.from_service_account_file('cohesive-scope-400809-b4cb18e44e7b.json',
17+
scopes=['https://www.googleapis.com/auth/drive'])
1818

1919
drive_service = build('drive', 'v3', credentials=credentials)
2020

21-
project_folder_path = 'C:/Users/LENOVO/CGprojects/massive'
21+
project_folder_path = 'C:/Users/Usewr/computer_graphics/massive'
22+
2223

2324
def upload_file(file_path, parent_folder_id):
2425
filename = os.path.basename(file_path)
@@ -29,6 +30,7 @@ def upload_file(file_path, parent_folder_id):
2930
media = MediaFileUpload(file_path)
3031
drive_service.files().create(body=file_metadata, media_body=media, fields='id').execute()
3132

33+
3234
folder_metadata = {
3335
'name': 'Computer Graphics GRP9',
3436
'mimeType': 'application/vnd.google-apps.folder'
@@ -49,4 +51,4 @@ def upload_file(file_path, parent_folder_id):
4951
if '.git' not in file_path:
5052
upload_file(file_path, folder_id)
5153

52-
print('Project folder uploaded successfully and shared with [email protected].')
54+
print('Project folder uploaded successfully and shared with [email protected].')

main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import sys
33
import os
44

5+
56
def main():
67
# Update this directory as per the location of your dataset folder
78
input_dir = 'dataset/data'
@@ -52,5 +53,6 @@ def main():
5253
if train_translations_flag:
5354
functions.generate_combined_json(input_dir, train_output_directory, languages)
5455

56+
5557
if __name__ == "__main__":
5658
main()

0 commit comments

Comments
 (0)