Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,9 +125,10 @@ print('=' * 70)
|
|
| 125 |
|
| 126 |
#====================================================================================
|
| 127 |
|
| 128 |
-
def Generate_POP_Section(
|
| 129 |
-
|
| 130 |
-
|
|
|
|
| 131 |
):
|
| 132 |
|
| 133 |
print('=' * 70)
|
|
@@ -137,17 +138,15 @@ def Generate_POP_Section(input_parsons_code,
|
|
| 137 |
print('=' * 70)
|
| 138 |
print('Requested settings:')
|
| 139 |
print('-' * 70)
|
| 140 |
-
print('
|
| 141 |
-
print('
|
| 142 |
-
print('
|
|
|
|
| 143 |
print('=' * 70)
|
| 144 |
|
| 145 |
#===============================================================================
|
| 146 |
|
| 147 |
-
|
| 148 |
-
#===============================================================================
|
| 149 |
-
|
| 150 |
-
print('Generating melody...')
|
| 151 |
|
| 152 |
# seq = [916] + [part_tok+512, mode_time(score)+532, mode_dur(score)+660, mode_pitch(score)+788]
|
| 153 |
|
|
@@ -289,13 +288,13 @@ if __name__ == "__main__":
|
|
| 289 |
|
| 290 |
gr.Markdown("## Select POP composition section to generate:")
|
| 291 |
|
| 292 |
-
input_comp_section = gr.Dropdown(sections_dict + ['random'], label="Composition section", value='
|
| 293 |
|
| 294 |
gr.Markdown("## Select generation options:")
|
| 295 |
|
| 296 |
-
input_mode_time = gr.Slider(0, 127, value=
|
| 297 |
-
input_mode_dur = gr.Slider(0, 127, value=
|
| 298 |
-
input_mode_ptc = gr.Slider(0, 127, value=
|
| 299 |
|
| 300 |
run_btn = gr.Button("Generate", variant="primary")
|
| 301 |
|
|
|
|
| 125 |
|
| 126 |
#====================================================================================
|
| 127 |
|
| 128 |
+
def Generate_POP_Section(input_comp_section,
|
| 129 |
+
input_mode_time,
|
| 130 |
+
input_mode_dur,
|
| 131 |
+
input_mode_ptc
|
| 132 |
):
|
| 133 |
|
| 134 |
print('=' * 70)
|
|
|
|
| 138 |
print('=' * 70)
|
| 139 |
print('Requested settings:')
|
| 140 |
print('-' * 70)
|
| 141 |
+
print('Composition section:', input_comp_section)
|
| 142 |
+
print('Mode time:', input_mode_time)
|
| 143 |
+
print('Mode duration:', input_mode_dur)
|
| 144 |
+
print('Mode pitch:', input_mode_ptc)
|
| 145 |
print('=' * 70)
|
| 146 |
|
| 147 |
#===============================================================================
|
| 148 |
|
| 149 |
+
print('Generating...')
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
# seq = [916] + [part_tok+512, mode_time(score)+532, mode_dur(score)+660, mode_pitch(score)+788]
|
| 152 |
|
|
|
|
| 288 |
|
| 289 |
gr.Markdown("## Select POP composition section to generate:")
|
| 290 |
|
| 291 |
+
input_comp_section = gr.Dropdown(sections_dict + ['random'], label="Composition section", value='random')
|
| 292 |
|
| 293 |
gr.Markdown("## Select generation options:")
|
| 294 |
|
| 295 |
+
input_mode_time = gr.Slider(0, 127, value=0, step=1, label="Composition mode time")
|
| 296 |
+
input_mode_dur = gr.Slider(0, 127, value=0, step=1, label="Composition mode dur")
|
| 297 |
+
input_mode_ptc = gr.Slider(0, 127, value=0, step=1, label="Composition mode pitch")
|
| 298 |
|
| 299 |
run_btn = gr.Button("Generate", variant="primary")
|
| 300 |
|