Spaces:
Build error
Build error
Jeremy Hummel
commited on
Commit
·
268ca90
1
Parent(s):
49aae60
Updates example caching
Browse files- app.py +2 -3
- visualize.py +1 -1
app.py
CHANGED
|
@@ -70,8 +70,8 @@ article = \
|
|
| 70 |
"""
|
| 71 |
|
| 72 |
examples = [
|
| 73 |
-
["examples/Maple_leaf_rag_-_played_by_Scott_Joplin_1916_V2.ogg", network_choices[0], 1.0, 0.25, 0.5, 512, 600
|
| 74 |
-
["examples/Muriel-Nguyen-Xuan-Beethovens-Moonlight-Sonata-mvt-3.ogx", network_choices[4], 1.2, 0.3, 0.5, 384, 600
|
| 75 |
]
|
| 76 |
|
| 77 |
demo = gr.Interface(
|
|
@@ -87,7 +87,6 @@ demo = gr.Interface(
|
|
| 87 |
gr.Slider(minimum=0.0, value=0.5, maximum=2.0, label="Jitter"),
|
| 88 |
gr.Slider(minimum=64, value=512, maximum=1024, step=64, label="Frame Length (samples)"),
|
| 89 |
gr.Slider(minimum=1, value=300, maximum=600, step=1, label="Max Duration (seconds)"),
|
| 90 |
-
gr.Textbox(value="output.mp4", visible=False),
|
| 91 |
],
|
| 92 |
examples=examples,
|
| 93 |
outputs=gr.Video(),
|
|
|
|
| 70 |
"""
|
| 71 |
|
| 72 |
examples = [
|
| 73 |
+
# ["examples/Maple_leaf_rag_-_played_by_Scott_Joplin_1916_V2.ogg", network_choices[0], 1.0, 0.25, 0.5, 512, 600],
|
| 74 |
+
["examples/Muriel-Nguyen-Xuan-Beethovens-Moonlight-Sonata-mvt-3.ogx", network_choices[4], 1.2, 0.3, 0.5, 384, 600],
|
| 75 |
]
|
| 76 |
|
| 77 |
demo = gr.Interface(
|
|
|
|
| 87 |
gr.Slider(minimum=0.0, value=0.5, maximum=2.0, label="Jitter"),
|
| 88 |
gr.Slider(minimum=64, value=512, maximum=1024, step=64, label="Frame Length (samples)"),
|
| 89 |
gr.Slider(minimum=1, value=300, maximum=600, step=1, label="Max Duration (seconds)"),
|
|
|
|
| 90 |
],
|
| 91 |
examples=examples,
|
| 92 |
outputs=gr.Video(),
|
visualize.py
CHANGED
|
@@ -16,7 +16,6 @@ def visualize(audio_file,
|
|
| 16 |
jitter,
|
| 17 |
frame_length,
|
| 18 |
duration,
|
| 19 |
-
outfile="output.mp4",
|
| 20 |
):
|
| 21 |
print(audio_file)
|
| 22 |
|
|
@@ -54,6 +53,7 @@ def visualize(audio_file,
|
|
| 54 |
# TODO:
|
| 55 |
batch_size = 1
|
| 56 |
resolution = 512
|
|
|
|
| 57 |
|
| 58 |
tempo_sensitivity = tempo_sensitivity * frame_length / 512
|
| 59 |
|
|
|
|
| 16 |
jitter,
|
| 17 |
frame_length,
|
| 18 |
duration,
|
|
|
|
| 19 |
):
|
| 20 |
print(audio_file)
|
| 21 |
|
|
|
|
| 53 |
# TODO:
|
| 54 |
batch_size = 1
|
| 55 |
resolution = 512
|
| 56 |
+
outfile="output.mp4"
|
| 57 |
|
| 58 |
tempo_sensitivity = tempo_sensitivity * frame_length / 512
|
| 59 |
|