Spaces:
Runtime error
Runtime error
Commit
•
2bdaae4
1
Parent(s):
dbfd260
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def predictor(audio_filename):
|
|
40 |
mfcc19 = v[18]
|
41 |
mfcc20 = v[19]
|
42 |
|
43 |
-
features = np.array([chroma_stft,rmse,spec_cent,spec_bw,rolloff,zcr,mfcc1,mfcc2,mfcc3,mfcc4,mfcc5,mfcc6,mfcc7,mfcc8,mfcc9,mfcc10,mfcc11,mfcc12,mfcc13,mfcc14,mfcc15,mfcc16,mfcc17,mfcc18,mfcc19,mfcc20])
|
44 |
|
45 |
prediction = model.predict(StandardScaler().fit_transform(features))
|
46 |
|
@@ -52,6 +52,6 @@ def predictor(audio_filename):
|
|
52 |
|
53 |
|
54 |
app = gr.Interface(predictor,
|
55 |
-
gr.Audio(source="upload",label="Please Upload Audio file here:"),
|
56 |
-
gr.Textbox(label="Result"),title="SMART UTI DETECTOR",description="UTI Prediction Model",examples=[["normal 1_rn.wav"]])
|
57 |
app.launch()
|
|
|
40 |
mfcc19 = v[18]
|
41 |
mfcc20 = v[19]
|
42 |
|
43 |
+
features = np.array([[chroma_stft,rmse,spec_cent,spec_bw,rolloff,zcr,mfcc1,mfcc2,mfcc3,mfcc4,mfcc5,mfcc6,mfcc7,mfcc8,mfcc9,mfcc10,mfcc11,mfcc12,mfcc13,mfcc14,mfcc15,mfcc16,mfcc17,mfcc18,mfcc19,mfcc20]])
|
44 |
|
45 |
prediction = model.predict(StandardScaler().fit_transform(features))
|
46 |
|
|
|
52 |
|
53 |
|
54 |
app = gr.Interface(predictor,
|
55 |
+
inputs=gr.inputs.Audio(source="upload",label="Please Upload Audio file here:"),
|
56 |
+
outputs=gr.outputs.Textbox(label="Result"),title="SMART UTI DETECTOR",description="UTI Prediction Model",examples=[["normal 1_rn.wav"]])
|
57 |
app.launch()
|