Commit
·
905e520
1
Parent(s):
d2811d8
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,8 @@ import numpy as np
|
|
4 |
import os
|
5 |
import soundfile as sf
|
6 |
|
|
|
|
|
7 |
def main():
|
8 |
# Gradio Interface
|
9 |
with gr.Blocks(title="Ilaria Audio Analyzer 💖", theme="dark") as demo:
|
@@ -16,6 +18,7 @@ def main():
|
|
16 |
Need help with AI? [Join AI Hub!](https://discord.gg/aihub)
|
17 |
"""
|
18 |
)
|
|
|
19 |
|
20 |
def create_spectrogram_and_get_info(audio_file):
|
21 |
# Clear figure in case it has data in it
|
@@ -63,5 +66,6 @@ def create_spectrogram_and_get_info(audio_file):
|
|
63 |
return info_table, 'spectrogram.png'
|
64 |
|
65 |
# Create the Gradio interface
|
|
|
66 |
iface = gr.Interface(fn=create_spectrogram_and_get_info, inputs=gr.Audio(type="filepath"), outputs=["markdown", "image"])
|
67 |
iface.launch()
|
|
|
4 |
import os
|
5 |
import soundfile as sf
|
6 |
|
7 |
+
|
8 |
+
|
9 |
def main():
|
10 |
# Gradio Interface
|
11 |
with gr.Blocks(title="Ilaria Audio Analyzer 💖", theme="dark") as demo:
|
|
|
18 |
Need help with AI? [Join AI Hub!](https://discord.gg/aihub)
|
19 |
"""
|
20 |
)
|
21 |
+
demo.queue(concurrency_count=511, max_size=1022).launch(share=True)
|
22 |
|
23 |
def create_spectrogram_and_get_info(audio_file):
|
24 |
# Clear figure in case it has data in it
|
|
|
66 |
return info_table, 'spectrogram.png'
|
67 |
|
68 |
# Create the Gradio interface
|
69 |
+
main()
|
70 |
iface = gr.Interface(fn=create_spectrogram_and_get_info, inputs=gr.Audio(type="filepath"), outputs=["markdown", "image"])
|
71 |
iface.launch()
|