-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinteract.py
More file actions
29 lines (22 loc) · 764 Bytes
/
interact.py
File metadata and controls
29 lines (22 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
def main():
import config
from model import load_model
model = load_model()
while not model:
config.model_path = input('valid model: ')
model = load_model()
from data import load_data, split_data, file_output
d = load_data(frames=not config.attention_only)
# d, _ = split_data(d)
# from random import shuffle
# shuffle(d)
for i,seq in enumerate(d[:config.hm_wav_gen]):
from model import respond_to
_, seq = respond_to(model, [seq], training_run=False, extra_steps=config.hm_extra_steps)
seq = seq.detach()
if config.use_gpu:
seq = seq.cpu()
seq = seq.numpy()
file_output(f'{config.output_file}{i}', seq)
if __name__ == '__main__':
main()