keshavbhandari commited on
Commit
c183bed
1 Parent(s): 605947d

Remove unused code and CSS styling

Browse files
Files changed (1) hide show
  1. app.py +3 -20
app.py CHANGED
@@ -125,9 +125,6 @@ def gradio_generate(prompt, temperature, max_length):
125
 
126
  return temp_wav_filename, midi_filename # Return both WAV and MIDI file paths
127
 
128
- # @spaces.GPU(duration=120)
129
- # def gradio_generate(prompt, temperature, max_length):
130
- # pass
131
 
132
  title="Text2midi: Generating Symbolic Music from Captions"
133
  description_text = """
@@ -145,15 +142,6 @@ temperature = gr.Slider(minimum=0.9, maximum=1.1, value=1.0, step=0.01, label="T
145
  max_length = gr.Number(value=1500, label="Max Length", minimum=500, maximum=2000, step=100)
146
 
147
  # CSS styling for the Duplicate button
148
- # css = '''
149
- # #duplicate-button {
150
- # margin: auto;
151
- # color: white;
152
- # background: #1565c0;
153
- # border-radius: 100vh;
154
- # }
155
- # '''
156
-
157
  css = '''
158
  #duplicate-button {
159
  margin: auto;
@@ -161,11 +149,6 @@ css = '''
161
  background: #1565c0;
162
  border-radius: 100vh;
163
  }
164
-
165
- .container-item {
166
- text-align: left !important; /* Force left alignment */
167
- margin-left: 10px; /* Optional: Add margin for better readability */
168
- }
169
  '''
170
 
171
  # Gradio interface
@@ -176,9 +159,9 @@ gr_interface = gr.Interface(
176
  description=description_text,
177
  allow_flagging=False,
178
  examples=[
179
- ["A cheerful and melodic pop Christmas song featuring piano, acoustic guitar, vibraphone, bass, and drums, set in the key of Eb minor with a fast tempo of 123 bpm and a 4/4 time signature, creating a joyful and relaxing atmosphere."],
180
- ["A melodic electronic song with ambient elements, featuring piano, acoustic guitar, alto saxophone, string ensemble, and electric bass. Set in G minor with a 4/4 time signature, it moves at a lively Presto tempo. The composition evokes a blend of relaxation and darkness, with hints of happiness and a meditative quality."],
181
- ["This motivational electronic and pop song features a clean electric guitar, rock organ, synth voice, acoustic guitar, and vibraphone, creating a melodic and uplifting atmosphere. Set in the key of G# minor with a 4/4 time signature, the track moves at an energetic Allegro tempo of 120 beats per minute. The chord progression of Bbm7 and F# adds to the song's inspiring and corporate feel."],
182
  ["This short electronic song in C minor features a brass section, string ensemble, tenor saxophone, clean electric guitar, and slap bass, creating a melodic and slightly dark atmosphere. With a tempo of 124 BPM (Allegro) and a 4/4 time signature, the track incorporates a chord progression of C7/E, Eb6, and Bbm6, adding a touch of corporate and motivational vibes to the overall composition."],
183
  ["An energetic and melodic electronic trance track with a space and retro vibe, featuring drums, distortion guitar, flute, synth bass, and slap bass. Set in A minor with a fast tempo of 138 BPM, the song maintains a 4/4 time signature throughout its duration."],
184
  ["A short but energetic rock fragment in C minor, featuring overdriven guitars, electric bass, and drums, with a vivacious tempo of 155 BPM and a 4/4 time signature, evoking a blend of dark and melodic tones."],
 
125
 
126
  return temp_wav_filename, midi_filename # Return both WAV and MIDI file paths
127
 
 
 
 
128
 
129
  title="Text2midi: Generating Symbolic Music from Captions"
130
  description_text = """
 
142
  max_length = gr.Number(value=1500, label="Max Length", minimum=500, maximum=2000, step=100)
143
 
144
  # CSS styling for the Duplicate button
 
 
 
 
 
 
 
 
 
145
  css = '''
146
  #duplicate-button {
147
  margin: auto;
 
149
  background: #1565c0;
150
  border-radius: 100vh;
151
  }
 
 
 
 
 
152
  '''
153
 
154
  # Gradio interface
 
159
  description=description_text,
160
  allow_flagging=False,
161
  examples=[
162
+ ["A haunting electronic ambient piece that evokes a sense of darkness and space, perfect for a film soundtrack. The string ensemble, trumpet, piano, timpani, and synth pad weave together to create a meditative atmosphere. Set in F minor with a 4/4 time signature, the song progresses at an Andante tempo, with the chords F, Fdim, and F/C recurring throughout."],
163
+ ["A slow and emotional classical piece, likely used in a film soundtrack, featuring a church organ as the sole instrument. Written in the key of Eb major with a 3/4 time signature, it evokes a sense of drama and romance. The chord progression of Bb7, Eb, and Ab contributes to the relaxing atmosphere throughout the song."],
164
+ ["An energetic and melodic electronic trance track with a space and retro vibe, featuring drums, distortion guitar, flute, synth bass, and slap bass. Set in A minor with a fast tempo of 138 BPM, the song maintains a 4/4 time signature throughout its duration."],
165
  ["This short electronic song in C minor features a brass section, string ensemble, tenor saxophone, clean electric guitar, and slap bass, creating a melodic and slightly dark atmosphere. With a tempo of 124 BPM (Allegro) and a 4/4 time signature, the track incorporates a chord progression of C7/E, Eb6, and Bbm6, adding a touch of corporate and motivational vibes to the overall composition."],
166
  ["An energetic and melodic electronic trance track with a space and retro vibe, featuring drums, distortion guitar, flute, synth bass, and slap bass. Set in A minor with a fast tempo of 138 BPM, the song maintains a 4/4 time signature throughout its duration."],
167
  ["A short but energetic rock fragment in C minor, featuring overdriven guitars, electric bass, and drums, with a vivacious tempo of 155 BPM and a 4/4 time signature, evoking a blend of dark and melodic tones."],