saumyap29 commited on
Commit
a9b503f
·
1 Parent(s): 0dfe35e

description and hints

Browse files
Files changed (1) hide show
  1. app.py +18 -4
app.py CHANGED
@@ -96,7 +96,10 @@ def process_fn(prompt: str, temperature: float, max_length: int):
96
  # HARP Model Card
97
  model_card = ModelCard(
98
  name="Text2MIDI (HARP)",
99
- description="Generate MIDI from a text prompt using a transformer decoder conditioned on T5 embeddings.",
 
 
 
100
  author="Keshav Bhandari, Abhinaba Roy, Kyra Wang, Geeta Puri, Simon Colton, Dorien Herremans",
101
  tags=["text-to-music", "midi", "generation"]
102
  )
@@ -106,9 +109,20 @@ with gr.Blocks() as demo:
106
  gr.Markdown("## 🎶 text2midi")
107
 
108
  # Inputs
109
- prompt_in = gr.Textbox(label="Prompt").harp_required(True)
110
- temperature_in = gr.Slider(minimum=0.8, maximum=1.1, value=0.9, step=0.1, label="Temperature", interactive=True)
111
- maxlen_in = gr.Slider(minimum=500, maximum=1500, step=100, value=500, label="Max Length")
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  # Outputs (JSON FIRST for HARP, then MIDI)
114
  labels_out = gr.JSON(label="Labels / Metadata")
 
96
  # HARP Model Card
97
  model_card = ModelCard(
98
  name="Text2MIDI (HARP)",
99
+ description="Turn your musical ideas into playable MIDI notes! 🎹\n\n"
100
+ "Input: Describe what you'd like to hear - example, "
101
+ "*“a gentle piano lullaby with soft strings”* \n"
102
+ "Output: This model will generate a matching MIDI sequence for playback or editing",
103
  author="Keshav Bhandari, Abhinaba Roy, Kyra Wang, Geeta Puri, Simon Colton, Dorien Herremans",
104
  tags=["text-to-music", "midi", "generation"]
105
  )
 
109
  gr.Markdown("## 🎶 text2midi")
110
 
111
  # Inputs
112
+ prompt_in = gr.Textbox(
113
+ label="Describe Your Music 🎵",
114
+ info="Type a short phrase like 'calm piano with flowing arpeggios'.",
115
+ ).harp_required(True)
116
+ temperature_in = gr.Slider(minimum=0.8, maximum=1.1, value=0.9, step=0.1, label="Creativity", info=(
117
+ "Controls how adventurous the generation is.\n"
118
+ "Lower = safer and more predictable (structured), "
119
+ "Higher = more varied and expressive."
120
+ ), interactive=True)
121
+
122
+ maxlen_in = gr.Slider(minimum=500, maximum=1500, step=100, value=500, label="Composition Length", info=(
123
+ "Determines how long the generated piece is in musical tokens.\n"
124
+ "Higher values produce longer phrases (roughly more measures of music).")
125
+ )
126
 
127
  # Outputs (JSON FIRST for HARP, then MIDI)
128
  labels_out = gr.JSON(label="Labels / Metadata")