Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,9 +56,10 @@ def analyze(path):
|
|
56 |
keep_byproducts=True, # TODO: remove this
|
57 |
)
|
58 |
|
|
|
59 |
for root, dirs, files in os.walk("./demix"):
|
60 |
for file in files:
|
61 |
-
|
62 |
#fig = allin1.visualize(
|
63 |
# result,
|
64 |
# multiprocess=False,
|
@@ -77,7 +78,7 @@ def analyze(path):
|
|
77 |
elapsed_time = end-start
|
78 |
|
79 |
#return result.bpm, fig, sonif_path, elapsed_time
|
80 |
-
return result.bpm, elapsed_time
|
81 |
|
82 |
|
83 |
with gr.Blocks() as demo:
|
@@ -102,7 +103,7 @@ with gr.Blocks() as demo:
|
|
102 |
# scale=9,
|
103 |
#)
|
104 |
elapsed_time = gr.Textbox(label='Overall inference time', scale=1)
|
105 |
-
|
106 |
#gr.Examples(
|
107 |
# examples=[
|
108 |
# './assets/NewJeans - Super Shy.mp3',
|
@@ -118,7 +119,7 @@ with gr.Blocks() as demo:
|
|
118 |
fn=analyze,
|
119 |
inputs=input_audio_path,
|
120 |
#outputs=[output_bpm, output_viz, output_sonif, elapsed_time],
|
121 |
-
outputs=[output_bpm, elapsed_time],
|
122 |
api_name='analyze',
|
123 |
)
|
124 |
|
|
|
56 |
keep_byproducts=True, # TODO: remove this
|
57 |
)
|
58 |
|
59 |
+
paths = []
|
60 |
for root, dirs, files in os.walk("./demix"):
|
61 |
for file in files:
|
62 |
+
paths.append(os.path.join(root, file))
|
63 |
#fig = allin1.visualize(
|
64 |
# result,
|
65 |
# multiprocess=False,
|
|
|
78 |
elapsed_time = end-start
|
79 |
|
80 |
#return result.bpm, fig, sonif_path, elapsed_time
|
81 |
+
return result.bpm, elapsed_time, paths
|
82 |
|
83 |
|
84 |
with gr.Blocks() as demo:
|
|
|
103 |
# scale=9,
|
104 |
#)
|
105 |
elapsed_time = gr.Textbox(label='Overall inference time', scale=1)
|
106 |
+
paths = gr.Textbox(label='paths', scale=1)
|
107 |
#gr.Examples(
|
108 |
# examples=[
|
109 |
# './assets/NewJeans - Super Shy.mp3',
|
|
|
119 |
fn=analyze,
|
120 |
inputs=input_audio_path,
|
121 |
#outputs=[output_bpm, output_viz, output_sonif, elapsed_time],
|
122 |
+
outputs=[output_bpm, elapsed_time, paths],
|
123 |
api_name='analyze',
|
124 |
)
|
125 |
|