Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -130,7 +130,7 @@ title="Text2midi: Generating Symbolic Music from Captions"
|
|
130 |
description_text = """
|
131 |
<p><a href="https://huggingface.co/spaces/amaai-lab/text2midi/blob/main/app.py?duplicate=true"> <img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> For faster inference without waiting in queue, you may duplicate the space and upgrade to a GPU in the settings. <br/><br/>
|
132 |
Generate midi music using Text2midi by providing a text prompt.
|
133 |
-
<br/><br/> This is the demo for Text2midi. This model is the first end-to-end model for generating MIDI files from textual descriptions. By leveraging pretrained large language models and a powerful autoregressive transformer decoder, text2midi allows users to create symbolic music that aligns with detailed textual prompts, including musical attributes like chords, tempo, and style. </br> Read the <a href="https://www.arxiv.org/abs/2412.16526">full paper here.</a> </br> <a href="https://github.com/AMAAI-Lab/text2midi">View code on Github</a>. </br></br>***
|
134 |
<p/>
|
135 |
"""
|
136 |
#description_text = ""
|
@@ -139,7 +139,7 @@ input_text = gr.Textbox(lines=2, label="Prompt")
|
|
139 |
output_audio = gr.Audio(label="Generated Music", type="filepath")
|
140 |
output_midi = gr.File(label="Download MIDI File")
|
141 |
temperature = gr.Slider(minimum=0.8, maximum=1.1, value=0.9, step=0.1, label="Temperature", interactive=True)
|
142 |
-
max_length = gr.Number(value=
|
143 |
|
144 |
# CSS styling for the Duplicate button
|
145 |
css = '''
|
|
|
130 |
description_text = """
|
131 |
<p><a href="https://huggingface.co/spaces/amaai-lab/text2midi/blob/main/app.py?duplicate=true"> <img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> For faster inference without waiting in queue, you may duplicate the space and upgrade to a GPU in the settings. <br/><br/>
|
132 |
Generate midi music using Text2midi by providing a text prompt.
|
133 |
+
<br/><br/> This is the demo for Text2midi. This model is the first end-to-end model for generating MIDI files from textual descriptions. By leveraging pretrained large language models and a powerful autoregressive transformer decoder, text2midi allows users to create symbolic music that aligns with detailed textual prompts, including musical attributes like chords, tempo, and style. </br> Read the <a href="https://www.arxiv.org/abs/2412.16526">full paper here.</a> </br> <a href="https://github.com/AMAAI-Lab/text2midi">View code on Github</a>. </br></br>***The model was optimized for 1500-2000 as Max token Length. Due to Huggingface GPU restraints we have set the default to 500 tokens, this will generate shorter midi files that may be sub-optimal.
|
134 |
<p/>
|
135 |
"""
|
136 |
#description_text = ""
|
|
|
139 |
output_audio = gr.Audio(label="Generated Music", type="filepath")
|
140 |
output_midi = gr.File(label="Download MIDI File")
|
141 |
temperature = gr.Slider(minimum=0.8, maximum=1.1, value=0.9, step=0.1, label="Temperature", interactive=True)
|
142 |
+
max_length = gr.Number(value=500, label="Max Length", minimum=500, maximum=2000, step=100)
|
143 |
|
144 |
# CSS styling for the Duplicate button
|
145 |
css = '''
|