Spaces:
Sleeping
Sleeping
add stems paths
Browse files
app.py
CHANGED
@@ -49,13 +49,16 @@ def analyze(path):
|
|
49 |
start = time.time()
|
50 |
|
51 |
path = Path(path)
|
52 |
-
result = allin1.analyze(
|
53 |
path,
|
54 |
out_dir='./struct',
|
55 |
multiprocess=False,
|
56 |
keep_byproducts=True, # TODO: remove this
|
57 |
)
|
58 |
-
|
|
|
|
|
|
|
59 |
fig = allin1.visualize(
|
60 |
result,
|
61 |
multiprocess=False,
|
@@ -73,7 +76,8 @@ def analyze(path):
|
|
73 |
end = time.time()
|
74 |
elapsed_time = end-start
|
75 |
|
76 |
-
|
|
|
77 |
|
78 |
|
79 |
with gr.Blocks() as demo:
|
@@ -98,6 +102,8 @@ with gr.Blocks() as demo:
|
|
98 |
scale=9,
|
99 |
)
|
100 |
elapsed_time = gr.Textbox(label='Overall inference time', scale=1)
|
|
|
|
|
101 |
|
102 |
#gr.Examples(
|
103 |
# examples=[
|
@@ -113,7 +119,7 @@ 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 |
|
|
|
49 |
start = time.time()
|
50 |
|
51 |
path = Path(path)
|
52 |
+
result, stems_paths = allin1.analyze(
|
53 |
path,
|
54 |
out_dir='./struct',
|
55 |
multiprocess=False,
|
56 |
keep_byproducts=True, # TODO: remove this
|
57 |
)
|
58 |
+
#stems_paths_string =""
|
59 |
+
#for stem in stems_paths:
|
60 |
+
# stems_paths_string += stem + '\n'
|
61 |
+
|
62 |
fig = allin1.visualize(
|
63 |
result,
|
64 |
multiprocess=False,
|
|
|
76 |
end = time.time()
|
77 |
elapsed_time = end-start
|
78 |
|
79 |
+
|
80 |
+
return result.bpm, fig, sonif_path, stems_paths, elapsed_time
|
81 |
|
82 |
|
83 |
with gr.Blocks() as demo:
|
|
|
102 |
scale=9,
|
103 |
)
|
104 |
elapsed_time = gr.Textbox(label='Overall inference time', scale=1)
|
105 |
+
with gr.Row():
|
106 |
+
stems_paths = gr.Textbox(label='stems paths', scale=1)
|
107 |
|
108 |
#gr.Examples(
|
109 |
# examples=[
|
|
|
119 |
button.click(
|
120 |
fn=analyze,
|
121 |
inputs=input_audio_path,
|
122 |
+
outputs=[output_bpm, output_viz, output_sonif, stems_paths, elapsed_time],
|
123 |
api_name='analyze',
|
124 |
)
|
125 |
|