Files changed (1) hide show
  1. README.md +48 -3
README.md CHANGED
@@ -121,13 +121,58 @@ Once you enter the container, you can start a REST server for inference.
121
  Use CURL to query the server directly, note that the newline token `\n` is represented by `<n>` in the vocabulary, so we need to replace the newline token with `<n>` in both the prompt and the generated tokens.
122
 
123
  ```shell
124
- curl 'http://localhost:6000/api' -X 'PUT' -H 'Content-Type: application/json; charset=UTF-8' -d '{"prompts":["X:1<n>L:1/8<n>Q:1/8=200<n>M:4/4<n>K:Gmin<n>|:\"Gm\" BGdB"], "tokens_to_generate":4096}'
125
  ```
126
  Output:
127
  ```shell
128
- X:1<n>L:1/8<n>Q:1/8=200<n>M:4/4<n>K:Gmin<n>|:\"Gm\" BGdB fdBG |\"F\" AFcF dFcF |\"Gm\" BGdG gFBF |\"F\" AFAG AF F2 |\"Gm\" BGBd fffd |\"F\" cdcB cdeg | <n>\"Gm\" fdcB\"Eb\" AFcA |1 BGFG\"F\" AFGc :|2 BGFG\"F\" AF F2 ||<eos>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  ```
130
 
131
  Once you encode the generated tokens into audio, you will hear the following music.
132
 
133
- <audio controls src="https://cdn-uploads.huggingface.co/production/uploads/640701cb4dc5f2846c91d4eb/gnBULaFjcUyXYzzIwXLZq.mpga"></audio>
 
121
  Use CURL to query the server directly, note that the newline token `\n` is represented by `<n>` in the vocabulary, so we need to replace the newline token with `<n>` in both the prompt and the generated tokens.
122
 
123
  ```shell
124
+ curl 'http://localhost:6000/api' -X 'PUT' -H 'Content-Type: application/json; charset=UTF-8' -d '{"prompts":["X:1<n>T:Music21 Fragment<n>T:Music21 Fragment<n>T:Music21<n>C:Music21<n>%%score 1 2 3 4<n>L:1/4<n>M:4/4<n>K:C<n>V:1 treble nm=\"Piano\" snm=\"Pno\"<n>%%MIDI program 0<n>%%MIDI control 7 100<n>%%MIDI control 10 64<n>V:2 treble nm=\"Piano\" snm=\"Pno\"<n>%%MIDI channel 3<n>%%MIDI program 0<n>%%MIDI control 7 100<n>%%MIDI control 10 64<n>V:3 bass nm=\"Piano\" snm=\"Pno\"<n>%%MIDI channel 4<n>%%MIDI program 0<n>%%MIDI control 7 100<n>%%MIDI control 10 64<n>V:4 bass nm=\"Piano\" snm=\"Pno\"<n>%%MIDI channel 5<n>%%MIDI program 0<n>%%MIDI control 7 100<n>%%MIDI control 10 64<n>V:1<n> z3 c | B A G F/E/ | !fermata!E ^F ^G A | B e d c | !fermata!B2 G A | B c d e | %6<n> !fermata!c2"], "tokens_to_generate":4096}'
125
  ```
126
  Output:
127
  ```shell
128
+ X:1
129
+ T:Music21 Fragment
130
+ T:Music21 Fragment
131
+ T:Music21
132
+ C:Music21
133
+ %%score 1 2 3 4
134
+ L:1/4
135
+ M:4/4
136
+ K:C
137
+ V:1 treble nm="Piano" snm="Pno"
138
+ %%MIDI program 0
139
+ %%MIDI control 7 100
140
+ %%MIDI control 10 64
141
+ V:2 treble nm="Piano" snm="Pno"
142
+ %%MIDI channel 3
143
+ %%MIDI program 0
144
+ %%MIDI control 7 100
145
+ %%MIDI control 10 64
146
+ V:3 bass nm="Piano" snm="Pno"
147
+ %%MIDI channel 4
148
+ %%MIDI program 0
149
+ %%MIDI control 7 100
150
+ %%MIDI control 10 64
151
+ V:4 bass nm="Piano" snm="Pno"
152
+ %%MIDI channel 5
153
+ %%MIDI program 0
154
+ %%MIDI control 7 100
155
+ %%MIDI control 10 64
156
+ V:1
157
+ z3 c | B A G F/E/ | !fermata!E ^F ^G A | B e d c | !fermata!B2 G A | B c d e | %6
158
+ !fermata!c2 e | a g/f/ e d | !fermata!e2- e e | a e a g/f/ | e2 !fermata!d g | d d g e |1
159
+ e2 !fermata!e G :|3 e2 !fermata!e2- || e z z2 | z4 |]
160
+ V:2
161
+ z3 G | G E C B, | !fermata!C D E E | G G ^F A | !fermata!^G2 E E | G G G G | sG !fermata!B2 G |
162
+ c B B A | !fermata!^G2- G G | A B c d | c2 !fermata!B _B | A A _A A |1 G2 A !fermata!G :|3
163
+ G2 !fermata!A2- || A z z2 | z4 |]
164
+ V:3
165
+ z3 C,/D,/ | E, E, E, ^G,, | !fermata!A,, B,, B,, C,/D,/ | E, C, D, ^F, | !fermata!E,2 C, C,/D,/ |
166
+ E, C, B,, C, | !fermata!G, !fermata!G,,2 C,/D,/ | E, E, F, D, | !fermata!E,2- E, D, |
167
+ C, B,, A,, B,, | C,3/2 D,/ !fermata!G,, E, | F, F, _E, B,, |1 _B,, G,, ^F,, !fermata!G,, :|3
168
+ _B,, G,, !fermata!^F,,2- || F,, z z2 | z4 |]
169
+ V:4
170
+ z3 C,/B,,/ | A,, E,, A,, E,, | !fermata!A,, G,, E,, A,, | G,, C, B,, D,, |
171
+ !fermata!E,,2 E,,/F,,/ A,, | G,, C, G,, C, | !fermata!B,, !fermata!G,,2 C,/B,,/ | A,, E,, F,, D,, |
172
+ !fermata!E,,2- E,,/^F,,/ ^G,, | A,, ^G,, A,, B,, | C,3/2 D,/ !fermata!G,, E,, |
173
+ F,,/G,,/ A,, B,, E,, |1 G,, C,, ^F,, !fermata!G,, :|3 G,, C,, !fermata!^F,,2- || F,, z z2 | z4 |]
174
  ```
175
 
176
  Once you encode the generated tokens into audio, you will hear the following music.
177
 
178
+ <audio controls src="https://cdn-uploads.huggingface.co/production/uploads/640701cb4dc5f2846c91d4eb/cDaJ19RPkVZ_mSdzxAI-D.mpga"></audio>