Spaces:
Sleeping
Sleeping
remove sonification and visualization
Browse files
app.py
CHANGED
|
@@ -56,24 +56,25 @@ def analyze(path):
|
|
| 56 |
keep_byproducts=True, # TODO: remove this
|
| 57 |
)
|
| 58 |
|
| 59 |
-
fig = allin1.visualize(
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
)
|
| 63 |
-
fig.set_dpi(300)
|
| 64 |
|
| 65 |
-
allin1.sonify(
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
)
|
| 70 |
-
sonif_path = Path(f'./sonif/{path.stem}.sonif{path.suffix}').resolve().as_posix()
|
| 71 |
|
| 72 |
#Measure time for inference
|
| 73 |
end = time.time()
|
| 74 |
elapsed_time = end-start
|
| 75 |
|
| 76 |
-
return result.bpm, fig, sonif_path, elapsed_time
|
|
|
|
| 77 |
|
| 78 |
|
| 79 |
with gr.Blocks() as demo:
|
|
@@ -113,7 +114,8 @@ with gr.Blocks() as demo:
|
|
| 113 |
button.click(
|
| 114 |
fn=analyze,
|
| 115 |
inputs=input_audio_path,
|
| 116 |
-
outputs=[output_bpm, output_viz, output_sonif, elapsed_time],
|
|
|
|
| 117 |
api_name='analyze',
|
| 118 |
)
|
| 119 |
|
|
|
|
| 56 |
keep_byproducts=True, # TODO: remove this
|
| 57 |
)
|
| 58 |
|
| 59 |
+
#fig = allin1.visualize(
|
| 60 |
+
# result,
|
| 61 |
+
# multiprocess=False,
|
| 62 |
+
#)
|
| 63 |
+
#fig.set_dpi(300)
|
| 64 |
|
| 65 |
+
#allin1.sonify(
|
| 66 |
+
# result,
|
| 67 |
+
# out_dir='./sonif',
|
| 68 |
+
# multiprocess=False,
|
| 69 |
+
#)
|
| 70 |
+
#sonif_path = Path(f'./sonif/{path.stem}.sonif{path.suffix}').resolve().as_posix()
|
| 71 |
|
| 72 |
#Measure time for inference
|
| 73 |
end = time.time()
|
| 74 |
elapsed_time = end-start
|
| 75 |
|
| 76 |
+
#return result.bpm, fig, sonif_path, elapsed_time
|
| 77 |
+
#return result.bpm, elapsed_time
|
| 78 |
|
| 79 |
|
| 80 |
with gr.Blocks() as demo:
|
|
|
|
| 114 |
button.click(
|
| 115 |
fn=analyze,
|
| 116 |
inputs=input_audio_path,
|
| 117 |
+
#outputs=[output_bpm, output_viz, output_sonif, elapsed_time],
|
| 118 |
+
outputs=[output_bpm, elapsed_time],
|
| 119 |
api_name='analyze',
|
| 120 |
)
|
| 121 |
|