Spaces:
Running
on
Zero
Running
on
Zero
mrfakename
commited on
Commit
•
8a9329e
1
Parent(s):
7c7fa4d
Update musiclib.py
Browse files- musiclib.py +4 -2
musiclib.py
CHANGED
@@ -34,7 +34,7 @@ def musicgen(ccc='<pad>', piano_only=False):
|
|
34 |
output = ''
|
35 |
|
36 |
output += (ccc_output)
|
37 |
-
|
38 |
occurrence = {}
|
39 |
state = None
|
40 |
for i in range(4096): # only trained with ctx4096 (will be longer soon)
|
@@ -62,7 +62,9 @@ def musicgen(ccc='<pad>', piano_only=False):
|
|
62 |
else:
|
63 |
occurrence[token] = 0.3 + (occurrence[token] if token in occurrence else 0)
|
64 |
|
65 |
-
output +=
|
|
|
66 |
|
67 |
output += (' <end>')
|
|
|
68 |
return output
|
|
|
34 |
output = ''
|
35 |
|
36 |
output += (ccc_output)
|
37 |
+
yield output
|
38 |
occurrence = {}
|
39 |
state = None
|
40 |
for i in range(4096): # only trained with ctx4096 (will be longer soon)
|
|
|
62 |
else:
|
63 |
occurrence[token] = 0.3 + (occurrence[token] if token in occurrence else 0)
|
64 |
|
65 |
+
output += TOKEN_SEP + tokenizer.decode([token]))
|
66 |
+
yield output
|
67 |
|
68 |
output += (' <end>')
|
69 |
+
yield output
|
70 |
return output
|