Spaces:
Runtime error
Runtime error
Update infer/lib/train/process_ckpt.py
Browse files
infer/lib/train/process_ckpt.py
CHANGED
|
@@ -2,7 +2,7 @@ import os
|
|
| 2 |
import sys
|
| 3 |
import traceback
|
| 4 |
from collections import OrderedDict
|
| 5 |
-
|
| 6 |
import torch
|
| 7 |
|
| 8 |
from i18n.i18n import I18nAuto
|
|
@@ -90,8 +90,16 @@ def savee(ckpt, sr, if_f0, name, epoch, version, hps):
|
|
| 90 |
# Save the checkpoint to a local file
|
| 91 |
checkpoint_file = "assets/weights/%s.pth" % name
|
| 92 |
torch.save(opt, checkpoint_file)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
| 95 |
# Set up Google Drive API and upload the file
|
| 96 |
SCOPES = ['https://www.googleapis.com/auth/drive.file']
|
| 97 |
creds = service_account.Credentials.from_service_account_file(credentials_path, scopes=SCOPES)
|
|
|
|
| 2 |
import sys
|
| 3 |
import traceback
|
| 4 |
from collections import OrderedDict
|
| 5 |
+
import os
|
| 6 |
import torch
|
| 7 |
|
| 8 |
from i18n.i18n import I18nAuto
|
|
|
|
| 90 |
# Save the checkpoint to a local file
|
| 91 |
checkpoint_file = "assets/weights/%s.pth" % name
|
| 92 |
torch.save(opt, checkpoint_file)
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
current_directory = os.getcwd()
|
| 96 |
+
print("Current Working Directory:", current_directory)
|
| 97 |
+
files = os.listdir(current_directory)
|
| 98 |
|
| 99 |
+
print("Files in the current directory:")
|
| 100 |
+
for file in files:
|
| 101 |
+
print(file)
|
| 102 |
+
credentials_path = "/infer/lib/train/credentials.json"
|
| 103 |
# Set up Google Drive API and upload the file
|
| 104 |
SCOPES = ['https://www.googleapis.com/auth/drive.file']
|
| 105 |
creds = service_account.Credentials.from_service_account_file(credentials_path, scopes=SCOPES)
|