Spaces:
Running
Running
j-tobias
commited on
Commit
•
11c6153
1
Parent(s):
b5983bd
added Examples
Browse files- Examples/01_Normaler_Befund_Herzbasis.mp3 +0 -0
- Examples/02_Lauter_3_Herzton.mp3 +0 -0
- Examples/03_Aortenstenose.mp3 +0 -0
- Examples/04_Aorteninsuffizienz.mp3 +0 -0
- Examples/05_Aorteninsuffizienz_und_Aortenstenose.mp3 +0 -0
- Examples/06_Mitralinsuffizienz.mp3 +0 -0
- Examples/07_Mitralklappenprolaps_und_Mitralinsuffizienz.mp3 +0 -0
- Examples/08_Schwere_Mitralstenose.mp3 +0 -0
- Examples/09_Mitralsstenose_und_Mitralinsuffizienz.mp3 +0 -0
- Examples/10_Valvulaere_Pulmonalstenose.mp3 +0 -0
- Examples/11_Offener_Ductus_arteriosus_Botalli.mp3 +0 -0
- Examples/12_Perikardreiben.mp3 +0 -0
- app.py +11 -1
Examples/01_Normaler_Befund_Herzbasis.mp3
ADDED
Binary file (202 kB). View file
|
|
Examples/02_Lauter_3_Herzton.mp3
ADDED
Binary file (201 kB). View file
|
|
Examples/03_Aortenstenose.mp3
ADDED
Binary file (200 kB). View file
|
|
Examples/04_Aorteninsuffizienz.mp3
ADDED
Binary file (201 kB). View file
|
|
Examples/05_Aorteninsuffizienz_und_Aortenstenose.mp3
ADDED
Binary file (201 kB). View file
|
|
Examples/06_Mitralinsuffizienz.mp3
ADDED
Binary file (201 kB). View file
|
|
Examples/07_Mitralklappenprolaps_und_Mitralinsuffizienz.mp3
ADDED
Binary file (201 kB). View file
|
|
Examples/08_Schwere_Mitralstenose.mp3
ADDED
Binary file (201 kB). View file
|
|
Examples/09_Mitralsstenose_und_Mitralinsuffizienz.mp3
ADDED
Binary file (201 kB). View file
|
|
Examples/10_Valvulaere_Pulmonalstenose.mp3
ADDED
Binary file (201 kB). View file
|
|
Examples/11_Offener_Ductus_arteriosus_Botalli.mp3
ADDED
Binary file (196 kB). View file
|
|
Examples/12_Perikardreiben.mp3
ADDED
Binary file (201 kB). View file
|
|
app.py
CHANGED
@@ -3,6 +3,10 @@ import plotly.graph_objects as go
|
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
import librosa
|
|
|
|
|
|
|
|
|
6 |
|
7 |
|
8 |
def getBeats(audiodata:np.ndarray, sr:int):
|
@@ -126,7 +130,13 @@ with gr.Blocks() as app:
|
|
126 |
|
127 |
analyzebtn.click(analyze, audiofile, [results, spectogram_wave])
|
128 |
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
|
132 |
if __name__ == "__main__":
|
|
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
import librosa
|
6 |
+
import os
|
7 |
+
|
8 |
+
example_dir = "Examples"
|
9 |
+
example_files = [os.path.join(example_dir, f) for f in os.listdir(example_dir) if f.endswith(('.wav', '.mp3', '.ogg'))]
|
10 |
|
11 |
|
12 |
def getBeats(audiodata:np.ndarray, sr:int):
|
|
|
130 |
|
131 |
analyzebtn.click(analyze, audiofile, [results, spectogram_wave])
|
132 |
|
133 |
+
gr.Examples(
|
134 |
+
examples=example_files,
|
135 |
+
inputs=audiofile,
|
136 |
+
outputs=[results, spectogram_wave],
|
137 |
+
fn=analyze,
|
138 |
+
cache_examples=False
|
139 |
+
)
|
140 |
|
141 |
|
142 |
if __name__ == "__main__":
|