Update app.py
Browse files
app.py
CHANGED
|
@@ -178,7 +178,7 @@ def generate_chords(chords,
|
|
| 178 |
|
| 179 |
for o in out:
|
| 180 |
if len(chords)-2 <= len(o) <= 380-len(chords)-2:
|
| 181 |
-
if len(set(o)) >= len(chords)
|
| 182 |
good_outs.append(o)
|
| 183 |
|
| 184 |
if len(good_outs) > 0:
|
|
@@ -425,8 +425,8 @@ with app:
|
|
| 425 |
multiselect=True,
|
| 426 |
info='NOTE: Selected chords will be introduced into generated chords progression in order of selection'
|
| 427 |
)
|
| 428 |
-
input_temperature = gr.Slider(0.1, 1.0, value=
|
| 429 |
-
input_top_p_value = gr.Slider(0.1, 1.0, value=0.
|
| 430 |
|
| 431 |
run_btn = gr.Button("generate", variant="primary")
|
| 432 |
|
|
|
|
| 178 |
|
| 179 |
for o in out:
|
| 180 |
if len(chords)-2 <= len(o) <= 380-len(chords)-2:
|
| 181 |
+
if len(set(o)) >= len(chords) // 2:
|
| 182 |
good_outs.append(o)
|
| 183 |
|
| 184 |
if len(good_outs) > 0:
|
|
|
|
| 425 |
multiselect=True,
|
| 426 |
info='NOTE: Selected chords will be introduced into generated chords progression in order of selection'
|
| 427 |
)
|
| 428 |
+
input_temperature = gr.Slider(0.1, 1.0, value=0.9, step=0.01, label="Model temperature")
|
| 429 |
+
input_top_p_value = gr.Slider(0.1, 1.0, value=0.96, step=0.01, label="Model sampling top_p value")
|
| 430 |
|
| 431 |
run_btn = gr.Button("generate", variant="primary")
|
| 432 |
|