Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ print('\n\n\n')
|
|
17 |
print('Loading model...')
|
18 |
pipe = transformers.pipeline(
|
19 |
"text-generation",
|
20 |
-
model="dx2102/llama-midi",
|
21 |
# revision="c303c108399aba837146e893375849b918f413b3",
|
22 |
torch_dtype="bfloat16",
|
23 |
device="cuda",
|
@@ -50,7 +50,7 @@ example_prefix = '''pitch duration wait velocity instrument
|
|
50 |
|
51 |
def postprocess(txt, path):
|
52 |
# remove prefix
|
53 |
-
txt = txt.split('
|
54 |
# track = symusic.core.TrackSecond()
|
55 |
tracks = {}
|
56 |
|
|
|
17 |
print('Loading model...')
|
18 |
pipe = transformers.pipeline(
|
19 |
"text-generation",
|
20 |
+
model="dx2102/llama-midi-2",
|
21 |
# revision="c303c108399aba837146e893375849b918f413b3",
|
22 |
torch_dtype="bfloat16",
|
23 |
device="cuda",
|
|
|
50 |
|
51 |
def postprocess(txt, path):
|
52 |
# remove prefix
|
53 |
+
txt = txt.split('---\n')[-1]
|
54 |
# track = symusic.core.TrackSecond()
|
55 |
tracks = {}
|
56 |
|