Spaces:
Runtime error
Runtime error
test
Browse files
app.py
CHANGED
@@ -111,10 +111,6 @@ def process(file_name, embed_html_all):
|
|
111 |
"""
|
112 |
|
113 |
|
114 |
-
def change_audio(value):
|
115 |
-
return gr.Audio(value)
|
116 |
-
|
117 |
-
|
118 |
with gr.Blocks() as demo:
|
119 |
with gr.Row():
|
120 |
with gr.Column():
|
@@ -136,24 +132,31 @@ with gr.Blocks() as demo:
|
|
136 |
|
137 |
with gr.Row():
|
138 |
with gr.Column():
|
139 |
-
|
140 |
|
141 |
with gr.Row():
|
142 |
with gr.Column():
|
143 |
select_results = gr.Dropdown()
|
144 |
audio_player = gr.Audio()
|
145 |
|
146 |
-
|
|
|
|
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
|
153 |
-
|
|
|
|
|
|
|
154 |
|
155 |
analyze_url_btn.click(
|
156 |
-
process_url,
|
|
|
|
|
157 |
)
|
158 |
gr.Examples(
|
159 |
examples=[
|
@@ -165,14 +168,14 @@ with gr.Blocks() as demo:
|
|
165 |
"https://www.youtube.com/watch?v=Guzu9aAeDIc",
|
166 |
],
|
167 |
inputs=[audio_url_input],
|
168 |
-
outputs=[html,
|
169 |
fn=process_url,
|
170 |
cache_examples=False,
|
171 |
)
|
172 |
analyze_file_btn.click(
|
173 |
process_file,
|
174 |
inputs=[audio_input_file],
|
175 |
-
outputs=[
|
176 |
)
|
177 |
|
178 |
|
|
|
111 |
"""
|
112 |
|
113 |
|
|
|
|
|
|
|
|
|
114 |
with gr.Blocks() as demo:
|
115 |
with gr.Row():
|
116 |
with gr.Column():
|
|
|
132 |
|
133 |
with gr.Row():
|
134 |
with gr.Column():
|
135 |
+
csv_results = gr.File()
|
136 |
|
137 |
with gr.Row():
|
138 |
with gr.Column():
|
139 |
select_results = gr.Dropdown()
|
140 |
audio_player = gr.Audio()
|
141 |
|
142 |
+
def change_audio(value):
|
143 |
+
audio_player = gr.Audio(value)
|
144 |
+
return audio_player
|
145 |
|
146 |
+
select_results.select(
|
147 |
+
fn=change_audio, inputs=select_results, outputs=audio_player
|
148 |
+
)
|
149 |
+
# for i in range(max_output):
|
150 |
|
151 |
+
# tops.append(
|
152 |
+
# gr.Textbox(label=f"top{i} track name", show_label=True)
|
153 |
+
# )
|
154 |
+
# tops.append(gr.Audio(label=f"top{i}", show_label=False))
|
155 |
|
156 |
analyze_url_btn.click(
|
157 |
+
process_url,
|
158 |
+
inputs=[audio_url_input],
|
159 |
+
outputs=[html, csv_results, select_results.choices],
|
160 |
)
|
161 |
gr.Examples(
|
162 |
examples=[
|
|
|
168 |
"https://www.youtube.com/watch?v=Guzu9aAeDIc",
|
169 |
],
|
170 |
inputs=[audio_url_input],
|
171 |
+
outputs=[html, csv_results, select_results.choices],
|
172 |
fn=process_url,
|
173 |
cache_examples=False,
|
174 |
)
|
175 |
analyze_file_btn.click(
|
176 |
process_file,
|
177 |
inputs=[audio_input_file],
|
178 |
+
outputs=[csv_results, select_results.choices],
|
179 |
)
|
180 |
|
181 |
|