Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -386,6 +386,7 @@ def load_tools():
|
|
386 |
|
387 |
|
388 |
class TrinerModelVITS:
|
|
|
389 |
def __init__(self,dir_model="",
|
390 |
path_training_args="",
|
391 |
train_dataset_dirs=[],
|
@@ -639,11 +640,12 @@ pro=TrinerModelVITS(dir_model=dir_model,
|
|
639 |
|
640 |
@spaces.GPU(duration=30)
|
641 |
def run_train_epoch(num):
|
|
|
642 |
if num >0:
|
643 |
pro.init_training()
|
644 |
for i in range(num):
|
645 |
# model.train(True)
|
646 |
-
return pro.run_train_epoch()
|
647 |
else:
|
648 |
pro.save_pretrained(pro.dir_model)
|
649 |
pro.load_model()
|
|
|
386 |
|
387 |
|
388 |
class TrinerModelVITS:
|
389 |
+
KC=0
|
390 |
def __init__(self,dir_model="",
|
391 |
path_training_args="",
|
392 |
train_dataset_dirs=[],
|
|
|
640 |
|
641 |
@spaces.GPU(duration=30)
|
642 |
def run_train_epoch(num):
|
643 |
+
TrinerModelVITS.KC+=1
|
644 |
if num >0:
|
645 |
pro.init_training()
|
646 |
for i in range(num):
|
647 |
# model.train(True)
|
648 |
+
return pro.run_train_epoch() +f'- kc={TrinerModelVITS.KC}'
|
649 |
else:
|
650 |
pro.save_pretrained(pro.dir_model)
|
651 |
pro.load_model()
|