Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -39,6 +39,9 @@ def format_table_data(data_string):
|
|
39 |
columns = row.split("|")
|
40 |
formatted_row = [cell.strip() for cell in columns]
|
41 |
|
|
|
|
|
|
|
42 |
# Handle uneven rows by ensuring each row has the same number of columns
|
43 |
max_columns = max(len(columns) for columns in formatted_data) if formatted_data else len(columns)
|
44 |
while len(formatted_row) < max_columns:
|
@@ -166,8 +169,8 @@ if __name__ == "__main__":
|
|
166 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>MIDI Identification</h1>")
|
167 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Identify any MIDI in a comprehensive database of 1.42M+ MIDI records</h1>")
|
168 |
|
169 |
-
gr.Markdown("This is a demo for tegridy-tools\n\n"
|
170 |
-
"Please see [tegridy-tools](https://github.com/asigalov61/tegridy-tools) GitHub
|
171 |
)
|
172 |
|
173 |
gr.Markdown("## Upload your MIDI")
|
@@ -178,7 +181,7 @@ if __name__ == "__main__":
|
|
178 |
|
179 |
gr.Markdown("## MIDI identification results")
|
180 |
|
181 |
-
output_midi_md5 = gr.Textbox(label="
|
182 |
output_MIDID_results_table = gr.Dataframe(label="MIDID results table", wrap=True, col_count=(3, 'dynamic'))
|
183 |
|
184 |
run_event = submit.click(ID_MIDI, [input_midi,
|
|
|
39 |
columns = row.split("|")
|
40 |
formatted_row = [cell.strip() for cell in columns]
|
41 |
|
42 |
+
# Remove cells with only "-" symbols
|
43 |
+
formatted_row = [cell for cell in formatted_row if not all(char == '-' for char in cell)]
|
44 |
+
|
45 |
# Handle uneven rows by ensuring each row has the same number of columns
|
46 |
max_columns = max(len(columns) for columns in formatted_data) if formatted_data else len(columns)
|
47 |
while len(formatted_row) < max_columns:
|
|
|
169 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>MIDI Identification</h1>")
|
170 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Identify any MIDI in a comprehensive database of 1.42M+ MIDI records</h1>")
|
171 |
|
172 |
+
gr.Markdown("This is a demo for tegridy-tools and Monster MIDI dataset\n\n"
|
173 |
+
"Please see [tegridy-tools](https://github.com/asigalov61/tegridy-tools) and [Monster MIDI Dataset](https://github.com/asigalov61/Monster-MIDI-Dataset)GitHub repos for more information\n\n"
|
174 |
)
|
175 |
|
176 |
gr.Markdown("## Upload your MIDI")
|
|
|
181 |
|
182 |
gr.Markdown("## MIDI identification results")
|
183 |
|
184 |
+
output_midi_md5 = gr.Textbox(label="Monster MIDI dataset md5 hash")
|
185 |
output_MIDID_results_table = gr.Dataframe(label="MIDID results table", wrap=True, col_count=(3, 'dynamic'))
|
186 |
|
187 |
run_event = submit.click(ID_MIDI, [input_midi,
|