Update app.py
Browse files
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 = '
|
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).
|
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,
|