chong.zhang commited on
Commit
cc6f94a
·
1 Parent(s): 5a9eb30
Files changed (1) hide show
  1. app.py +8 -13
app.py CHANGED
@@ -135,30 +135,25 @@ with gr.Blocks() as demo:
135
  # InspireMusic
136
  Generate music using InspireMusic models with music generation tasks, i.e., "Text-to-Music", "Music Continuation".
137
  """)
138
- with gr.Column():
139
- with gr.Row():
140
- # task = gr.Radio(["text-to-music", "continuation"], label="Select Task",
141
- # value="text-to-music")
142
- model_name = gr.Dropdown(["InspireMusic-1.5B-Long", "InspireMusic-1.5B", "InspireMusic-1.5B-24kHz", "InspireMusic-Base", "InspireMusic-Base-24kHz"], label="Select Model Name", value="InspireMusic-Base")
143
- chorus = gr.Dropdown(["intro", "verse", "chorus", "outro"],
144
  label="Chorus Mode", value="intro")
145
- output_sample_rate = gr.Dropdown([48000, 24000],
146
  label="Output Audio Sample Rate (Hz)",
147
  value=48000)
148
- max_generate_audio_seconds = gr.Slider(10, 300,
149
  label="Max Generated Audio Length (Seconds)",
150
  value=30)
151
-
 
152
  # Textbox for custom input
153
  text_input = gr.Textbox(label="Input Text (For Text-to-Music Task)", value="Experience soothing and sensual instrumental jazz with a touch of Bossa Nova, perfect for a relaxing restaurant or spa ambiance.")
154
 
155
  audio_input = gr.Audio(label="Input Prompt Audio (For Music Continuation Task)",
156
  type="filepath")
157
 
158
- with gr.Row():
159
- fast = gr.Checkbox(label="Fast Inference", value=False)
160
- fade_out = gr.Checkbox(label="Apply Fade Out Effect", value=True)
161
-
162
  music_output = gr.Audio(label="Generated Music Result", type="filepath")
163
 
164
  with gr.Row():
 
135
  # InspireMusic
136
  Generate music using InspireMusic models with music generation tasks, i.e., "Text-to-Music", "Music Continuation".
137
  """)
138
+ # with gr.Column():
139
+ with gr.Row():
140
+ model_name = gr.Dropdown(["InspireMusic-1.5B-Long", "InspireMusic-1.5B", "InspireMusic-1.5B-24kHz", "InspireMusic-Base", "InspireMusic-Base-24kHz"], label="Select Model Name", value="InspireMusic-Base")
141
+ chorus = gr.Dropdown(["intro", "verse", "chorus", "outro"],
 
 
142
  label="Chorus Mode", value="intro")
143
+ output_sample_rate = gr.Dropdown([48000, 24000],
144
  label="Output Audio Sample Rate (Hz)",
145
  value=48000)
146
+ max_generate_audio_seconds = gr.Slider(10, 300,
147
  label="Max Generated Audio Length (Seconds)",
148
  value=30)
149
+ fast = gr.Checkbox(label="Fast Inference", value=False)
150
+ fade_out = gr.Checkbox(label="Apply Fade Out Effect", value=True)
151
  # Textbox for custom input
152
  text_input = gr.Textbox(label="Input Text (For Text-to-Music Task)", value="Experience soothing and sensual instrumental jazz with a touch of Bossa Nova, perfect for a relaxing restaurant or spa ambiance.")
153
 
154
  audio_input = gr.Audio(label="Input Prompt Audio (For Music Continuation Task)",
155
  type="filepath")
156
 
 
 
 
 
157
  music_output = gr.Audio(label="Generated Music Result", type="filepath")
158
 
159
  with gr.Row():