File size: 487 Bytes
b5dba8a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os.path

from args import args
from prepare import prepare, prepare2
from test_hubert import test_hubert
from hubert.customtokenizer import auto_train

path = args.path
mode = args.mode
model = args.hubert_model

if mode == 'prepare':
    prepare(path)

elif mode == 'prepare2':
    prepare2(path, model)

elif mode == 'train':
    auto_train(path, load_model=os.path.join(path, 'model.pth'), save_epochs=args.train_save_epochs)

elif mode == 'test':
    test_hubert(path, model)