asigalov61 commited on
Commit
796a547
1 Parent(s): a12959b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,7 +33,7 @@ def GenerateSong(input_melody_seed_number):
33
 
34
  SEQ_LEN = 2560
35
  PAD_IDX = 514
36
- DEVICE = 'cuda' # 'cuda'
37
 
38
  # instantiate the model
39
 
@@ -78,7 +78,7 @@ def GenerateSong(input_melody_seed_number):
78
  print('=' * 70)
79
  print('Generating...')
80
 
81
- x = (torch.tensor(seed_melody, dtype=torch.long, device='cuda')[None, ...])
82
 
83
  with ctx:
84
  with torch.inference_mode():
 
33
 
34
  SEQ_LEN = 2560
35
  PAD_IDX = 514
36
+ DEVICE = 'cpu' # 'cuda'
37
 
38
  # instantiate the model
39
 
 
78
  print('=' * 70)
79
  print('Generating...')
80
 
81
+ x = (torch.tensor(seed_melody, dtype=torch.long, device=DEVICE)[None, ...])
82
 
83
  with ctx:
84
  with torch.inference_mode():