asigalov61 commited on
Commit
bcefdd2
·
verified ·
1 Parent(s): b37dd07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ def Text_to_Music(input_title, input_num_tokens, input_prompt_type):
32
 
33
  SEQ_LEN = 4096 # Models seq len
34
  PAD_IDX = 2571 # Models pad index
35
- DEVICE = 'cuda' # 'cuda'
36
 
37
  # instantiate the model
38
 
@@ -171,7 +171,7 @@ def Text_to_Music(input_title, input_num_tokens, input_prompt_type):
171
 
172
  inp = [outy] * number_of_batches_to_generate
173
 
174
- inp = torch.LongTensor(inp).cuda()
175
 
176
  with ctx:
177
  out = model.generate(inp,
 
32
 
33
  SEQ_LEN = 4096 # Models seq len
34
  PAD_IDX = 2571 # Models pad index
35
+ DEVICE = 'cpu' # 'cuda'
36
 
37
  # instantiate the model
38
 
 
171
 
172
  inp = [outy] * number_of_batches_to_generate
173
 
174
+ inp = torch.LongTensor(inp).to(DEVICE)
175
 
176
  with ctx:
177
  out = model.generate(inp,