Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -158,8 +158,8 @@ def generate_music(
|
|
| 158 |
raw_output = None
|
| 159 |
|
| 160 |
# Decoding config
|
| 161 |
-
top_p = 0.
|
| 162 |
-
temperature = 0
|
| 163 |
repetition_penalty = 1.2
|
| 164 |
start_of_segment = mmtokenizer.tokenize('[start_of_segment]')
|
| 165 |
end_of_segment = mmtokenizer.tokenize('[end_of_segment]')
|
|
@@ -220,7 +220,7 @@ def generate_music(
|
|
| 220 |
logits_processor=LogitsProcessorList([BlockTokenRangeProcessor(0, 32002), BlockTokenRangeProcessor(32016, 32016)]),
|
| 221 |
guidance_scale=guidance_scale,
|
| 222 |
use_cache=True,
|
| 223 |
-
num_beams=
|
| 224 |
)
|
| 225 |
if output_seq[0][-1].item() != mmtokenizer.eoa:
|
| 226 |
tensor_eoa = torch.as_tensor([[mmtokenizer.eoa]]).to(model.device)
|
|
|
|
| 158 |
raw_output = None
|
| 159 |
|
| 160 |
# Decoding config
|
| 161 |
+
top_p = 0.93
|
| 162 |
+
temperature = 1.0
|
| 163 |
repetition_penalty = 1.2
|
| 164 |
start_of_segment = mmtokenizer.tokenize('[start_of_segment]')
|
| 165 |
end_of_segment = mmtokenizer.tokenize('[end_of_segment]')
|
|
|
|
| 220 |
logits_processor=LogitsProcessorList([BlockTokenRangeProcessor(0, 32002), BlockTokenRangeProcessor(32016, 32016)]),
|
| 221 |
guidance_scale=guidance_scale,
|
| 222 |
use_cache=True,
|
| 223 |
+
num_beams=1
|
| 224 |
)
|
| 225 |
if output_seq[0][-1].item() != mmtokenizer.eoa:
|
| 226 |
tensor_eoa = torch.as_tensor([[mmtokenizer.eoa]]).to(model.device)
|