patchbanks commited on
Commit
e348a77
·
verified ·
1 Parent(s): 0ff4601

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -213,7 +213,22 @@ def generate_and_return_files(bpm, temperature, top_k, uploaded_sf2=None):
213
  return midi_file, wav_fx
214
 
215
 
216
- with gr.Blocks() as iface:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  gr.Markdown("<h1 style='font-weight: bold; text-align: center;'>nanoMPC - AI Midi Drum Sequencer</h1>")
218
  gr.Markdown("<p style='text-align:center;'>nanoMPC is a tiny transformer model that generates MIDI drum beats inspired by Lo-Fi, Boom Bap and other styles of Hip Hop.</p>")
219
 
@@ -227,7 +242,7 @@ with gr.Blocks() as iface:
227
  with gr.Column(scale=1):
228
  midi_file = gr.File(label="MIDI File Output")
229
  audio_file = gr.Audio(label="Generated Audio Output", type="filepath")
230
- generate_button = gr.Button("Generate")
231
 
232
  generate_button.click(
233
  fn=generate_and_return_files,
 
213
  return midi_file, wav_fx
214
 
215
 
216
+ custom_css = """
217
+ #generate-btn {
218
+ background-color: #6366f1 !important;
219
+ color: white !important;
220
+ border: none !important;
221
+ font-size: 16px;
222
+ padding: 10px 20px;
223
+ border-radius: 5px;
224
+ cursor: pointer;
225
+ }
226
+ #generate-btn:hover {
227
+ background-color: #4f51c5 !important;
228
+ }
229
+ """
230
+
231
+ with gr.Blocks(css=custom_css, theme="soft") as iface:
232
  gr.Markdown("<h1 style='font-weight: bold; text-align: center;'>nanoMPC - AI Midi Drum Sequencer</h1>")
233
  gr.Markdown("<p style='text-align:center;'>nanoMPC is a tiny transformer model that generates MIDI drum beats inspired by Lo-Fi, Boom Bap and other styles of Hip Hop.</p>")
234
 
 
242
  with gr.Column(scale=1):
243
  midi_file = gr.File(label="MIDI File Output")
244
  audio_file = gr.Audio(label="Generated Audio Output", type="filepath")
245
+ generate_button = gr.Button("Generate", elem_id="generate-btn")
246
 
247
  generate_button.click(
248
  fn=generate_and_return_files,