misnaej commited on
Commit
510afb1
1 Parent(s): 127ef0f

updated description and cleanup

Browse files
Files changed (1) hide show
  1. playground.py +2 -6
playground.py CHANGED
@@ -3,7 +3,7 @@ from load import LoadModel
3
  from generate import GenerateMidiText
4
  from constants import INSTRUMENT_TRANSFER_CLASSES
5
  from decoder import TextDecoder
6
- from utils import get_miditok, index_has_substring
7
  from playback import get_music
8
  from matplotlib import pylab
9
  import sys
@@ -17,8 +17,6 @@ sys.modules["pylab"] = pylab
17
 
18
  model_repo = "JammyMachina/elec-gmusic-familized-model-13-12__17-35-53"
19
  n_bar_generated = 8
20
- # model_repo = "JammyMachina/improved_4bars-mdl"
21
- # n_bar_generated = 4
22
 
23
  model, tokenizer = LoadModel(
24
  model_repo,
@@ -145,8 +143,6 @@ def instrument_col(default_inst, col_id):
145
  regenerate = gr.State(
146
  value=False
147
  ) # initial state should be to generate (not regenerate)
148
- # add_bars = gr.Checkbox(value=False, label="Add Bars")
149
- # add_bar_count = gr.Dropdown([1, 2, 4, 8], value=1, label="Add Bars")
150
  gen_btn = gr.Button("Generate")
151
  inst_audio = gr.Audio(label="TRACK Audio", show_label=True)
152
  output_txt = gr.Textbox(
@@ -181,7 +177,7 @@ with gr.Blocks() as demo:
181
  """
182
  For each **TRACK**, choose your **instrument** along with **creativity** (temperature) and **note density**.
183
  Then, hit the **Generate** Button, and after a few seconds a track should have been generated.
184
- Check the **piano roll** and listen to the TRACK! If you don't like the track, hit the generate button to regenerate it.
185
  You can then generate more tracks and listen to the **mixed audio**! \n
186
  Does it sound nice? Maybe a little robotic and laking some depth... Well, you can download the MIDI file and import it in your favorite DAW to edit the instruments and add some effects!
187
  """
 
3
  from generate import GenerateMidiText
4
  from constants import INSTRUMENT_TRANSFER_CLASSES
5
  from decoder import TextDecoder
6
+ from utils import get_miditok
7
  from playback import get_music
8
  from matplotlib import pylab
9
  import sys
 
17
 
18
  model_repo = "JammyMachina/elec-gmusic-familized-model-13-12__17-35-53"
19
  n_bar_generated = 8
 
 
20
 
21
  model, tokenizer = LoadModel(
22
  model_repo,
 
143
  regenerate = gr.State(
144
  value=False
145
  ) # initial state should be to generate (not regenerate)
 
 
146
  gen_btn = gr.Button("Generate")
147
  inst_audio = gr.Audio(label="TRACK Audio", show_label=True)
148
  output_txt = gr.Textbox(
 
177
  """
178
  For each **TRACK**, choose your **instrument** along with **creativity** (temperature) and **note density**.
179
  Then, hit the **Generate** Button, and after a few seconds a track should have been generated.
180
+ Check the **piano roll** and listen to the TRACK! If you don't like it, hit the generate button to regenerate it.
181
  You can then generate more tracks and listen to the **mixed audio**! \n
182
  Does it sound nice? Maybe a little robotic and laking some depth... Well, you can download the MIDI file and import it in your favorite DAW to edit the instruments and add some effects!
183
  """