Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ from VitsModelSplit.Arguments import DataTrainingArguments, ModelArguments, VITS
|
|
36 |
from VitsModelSplit.dataset_features_collector import FeaturesCollectionDataset
|
37 |
from torch.cuda.amp import autocast, GradScaler
|
38 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
39 |
-
|
40 |
-
# model1= VitsModel.
|
41 |
# model= VitsModel.from_pretrained("/content/drive/MyDrive/vitsM/TO/sp3/core/vend").to("cuda")
|
42 |
# model=VitsModel.from_pretrained("/content/drive/MyDrive/vitsM/heppa/EndCore3/v0").to("cuda")
|
43 |
# model.discriminator=model1.discriminator
|
@@ -570,10 +570,6 @@ train_dataset_dirs=[
|
|
570 |
|
571 |
]
|
572 |
|
573 |
-
ctrain_datasets,eval_dataset,full_generation_dataset=get_data_loader(train_dataset_dirs = train_dataset_dirs,
|
574 |
-
eval_dataset_dir = os.path.join(dataset_dir,'eval'),
|
575 |
-
full_generation_dir = os.path.join(dataset_dir,'full_generation'),
|
576 |
-
device=device)
|
577 |
|
578 |
|
579 |
|
@@ -596,6 +592,12 @@ wandb.init(project= 'AZ',config = training_args.to_dict())
|
|
596 |
def greet(text,id):
|
597 |
global GK
|
598 |
b=int(id)
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
for i in range(10000):
|
600 |
# model.train(True)
|
601 |
print(f'clcye epochs ={i}')
|
@@ -628,11 +630,7 @@ def greet(text,id):
|
|
628 |
|
629 |
|
630 |
)
|
631 |
-
|
632 |
-
GK+=1
|
633 |
-
texts=[text]*b
|
634 |
-
out=modelspeech(texts)
|
635 |
-
yield f"namber is {GK}"
|
636 |
|
637 |
demo = gr.Interface(fn=greet, inputs=["text","text"], outputs="text")
|
638 |
demo.launch()
|
|
|
36 |
from VitsModelSplit.dataset_features_collector import FeaturesCollectionDataset
|
37 |
from torch.cuda.amp import autocast, GradScaler
|
38 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
39 |
+
|
40 |
+
# model1= VitsModel.from_pretrined("/content/drive/MyDrive/vitsM/OneBatch/S6/MMMMM-dash-azd60").to("cuda")
|
41 |
# model= VitsModel.from_pretrained("/content/drive/MyDrive/vitsM/TO/sp3/core/vend").to("cuda")
|
42 |
# model=VitsModel.from_pretrained("/content/drive/MyDrive/vitsM/heppa/EndCore3/v0").to("cuda")
|
43 |
# model.discriminator=model1.discriminator
|
|
|
570 |
|
571 |
]
|
572 |
|
|
|
|
|
|
|
|
|
573 |
|
574 |
|
575 |
|
|
|
592 |
def greet(text,id):
|
593 |
global GK
|
594 |
b=int(id)
|
595 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
596 |
+
ctrain_datasets,eval_dataset,full_generation_dataset=get_data_loader(train_dataset_dirs = train_dataset_dirs,
|
597 |
+
eval_dataset_dir = os.path.join(dataset_dir,'eval'),
|
598 |
+
full_generation_dir = os.path.join(dataset_dir,'full_generation'),
|
599 |
+
device=device)
|
600 |
+
|
601 |
for i in range(10000):
|
602 |
# model.train(True)
|
603 |
print(f'clcye epochs ={i}')
|
|
|
630 |
|
631 |
|
632 |
)
|
633 |
+
|
|
|
|
|
|
|
|
|
634 |
|
635 |
demo = gr.Interface(fn=greet, inputs=["text","text"], outputs="text")
|
636 |
demo.launch()
|