kubinooo commited on
Commit
1ed5802
·
1 Parent(s): 55f86e1

Add application file

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from predict import prediction
3
+
4
+ title = "Audio deepfake Classification using 2s segment mel-spectrograms with Examples Only"
5
+ description = """This space uses fine-tuned kubinooo/convnext-tiny-224-audio-deepfake-classification model to classify audio files.
6
+ """
7
+
8
+ demo = gr.Interface(
9
+ title=title,
10
+ inputs=gr.Audio( type="filepath",
11
+ interactive=True, # This prevents users from uploading their own images
12
+ show_label=True,
13
+ label="Select from examples below or upload/record your own audio"),
14
+ fn=prediction,
15
+ outputs=gr.Label(
16
+ num_top_classes=2,
17
+ ),
18
+ examples=[
19
+ "src/31-MALE-VC-FAKE.wav",
20
+ "src/2152-REAL.wav"
21
+ ],
22
+ description=description
23
+ )
24
+
25
+ demo.launch()