Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
from datetime import datetime
|
2 |
from pathlib import Path
|
3 |
|
@@ -19,6 +20,7 @@ top_k=250
|
|
19 |
cfg_coef=3.0
|
20 |
|
21 |
def music(text,duration=duration,use_sampling=use_sampling,temperature=temperature,top_k=top_k,cfg_coef=cfg_coef):
|
|
|
22 |
|
23 |
|
24 |
model.set_generation_params(
|
@@ -47,3 +49,8 @@ def music(text,duration=duration,use_sampling=use_sampling,temperature=temperatu
|
|
47 |
|
48 |
# Or, if in a notebook, display audio widgets
|
49 |
# display_audio(out, model.sample_rate)
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from gradio import gr
|
2 |
from datetime import datetime
|
3 |
from pathlib import Path
|
4 |
|
|
|
20 |
cfg_coef=3.0
|
21 |
|
22 |
def music(text,duration=duration,use_sampling=use_sampling,temperature=temperature,top_k=top_k,cfg_coef=cfg_coef):
|
23 |
+
text = "hip hop, soul, piano, chords, jazz, neo jazz, G# minor, 140 bpm"
|
24 |
|
25 |
|
26 |
model.set_generation_params(
|
|
|
49 |
|
50 |
# Or, if in a notebook, display audio widgets
|
51 |
# display_audio(out, model.sample_rate)
|
52 |
+
with gr.Blocks() as app:
|
53 |
+
inp=gr.Textbox()
|
54 |
+
b=gr.Button()
|
55 |
+
b.click(music,inp,None)
|
56 |
+
app.launch()
|