Spaces:
Runtime error
Runtime error
TheStinger
commited on
Commit
·
9f83153
1
Parent(s):
6b42851
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def main():
|
|
29 |
|
30 |
app.queue(max_size=1022).launch(share=True)
|
31 |
|
32 |
-
def create_spectrogram_and_get_info(audio_file):
|
33 |
# Clear figure in case it has data in it
|
34 |
plt.clf()
|
35 |
|
@@ -82,8 +82,12 @@ def create_spectrogram_and_get_info(audio_file):
|
|
82 |
# Delete the audio file after analyzing it
|
83 |
os.remove(audio_file)
|
84 |
|
|
|
|
|
|
|
85 |
# Return the PNG file of the spectrogram and the info table
|
86 |
return info_table, 'spectrogram.png'
|
87 |
|
|
|
88 |
# Create the Gradio interface
|
89 |
main()
|
|
|
29 |
|
30 |
app.queue(max_size=1022).launch(share=True)
|
31 |
|
32 |
+
def create_spectrogram_and_get_info(audio_file, output_markdown):
|
33 |
# Clear figure in case it has data in it
|
34 |
plt.clf()
|
35 |
|
|
|
82 |
# Delete the audio file after analyzing it
|
83 |
os.remove(audio_file)
|
84 |
|
85 |
+
# Clear the markdown content
|
86 |
+
output_markdown.update({"value": "", "__type__": "update"})
|
87 |
+
|
88 |
# Return the PNG file of the spectrogram and the info table
|
89 |
return info_table, 'spectrogram.png'
|
90 |
|
91 |
+
|
92 |
# Create the Gradio interface
|
93 |
main()
|