Spaces:
Sleeping
Sleeping
Commit
·
d6bab68
1
Parent(s):
c70cefd
Upload 2 files
Browse files- app.py +31 -0
- requirements.txt +17 -0
app.py
CHANGED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Imports
|
2 |
+
from sklearn.linear_model import LogisticRegression
|
3 |
+
from sklearn.model_selection import cross_val_predict
|
4 |
+
from sklearn.metrics import accuracy_score
|
5 |
+
import joblib
|
6 |
+
import os
|
7 |
+
import pandas as pd
|
8 |
+
import numpy as np
|
9 |
+
import random
|
10 |
+
import tensorflow as tf
|
11 |
+
import torch
|
12 |
+
from tqdm import tqdm
|
13 |
+
import tensorflow_io as tfio
|
14 |
+
from pathlib import Path
|
15 |
+
from IPython import display
|
16 |
+
from speechbrain.pretrained import EncoderClassifier
|
17 |
+
import torchaudio
|
18 |
+
import joblib
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
# Defining the transcription function
|
23 |
+
def snoring(audio):
|
24 |
+
return text
|
25 |
+
|
26 |
+
# Defining the audio filepaths
|
27 |
+
audio = gr.inputs.Audio(type="filepath")
|
28 |
+
|
29 |
+
# Loading the gradio framwork
|
30 |
+
iface = gr.Interface(fn=snoring,inputs=audio, outputs="text", title="Snore.AI", description="Detect Snotring with artificial intelligence.")
|
31 |
+
iface.launch()
|
requirements.txt
CHANGED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
sklearn.linear_model import LogisticRegression
|
2 |
+
sklearn.model_selection import cross_val_predict
|
3 |
+
sklearn.metrics import accuracy_score
|
4 |
+
joblib
|
5 |
+
os
|
6 |
+
pandas as pd
|
7 |
+
numpy as np
|
8 |
+
random
|
9 |
+
tensorflow as tf
|
10 |
+
torch
|
11 |
+
tqdm import tqdm
|
12 |
+
tensorflow_io as tfio
|
13 |
+
pathlib import Path
|
14 |
+
IPython import display
|
15 |
+
speechbrain.pretrained import EncoderClassifier
|
16 |
+
torchaudio
|
17 |
+
joblib
|