File size: 636 Bytes
795a174
 
e4d1fdf
795a174
 
 
28cac0d
 
 
b00f97f
795a174
 
 
 
 
b00f97f
795a174
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
import torch
from model import pred_audio

# Define the audio input component
input_audio = gr.Audio(sources=["upload"], waveform_options=dict(waveform_color="#01C6FF"), type="filepath")
output1 = gr.Number(label="ShallowCNN", show_label=True)
output2 = gr.Number(label="SimpleLSTM", show_label=True)
output3 = gr.Number(label="DTDNN", show_label=True)
output4 = gr.Number(label="Ensemble", show_label=True)

# Create the Gradio interface
interface = gr.Interface(
    fn=pred_audio,
    inputs=input_audio,
    outputs=[output1, output2, output3, output4],
    title="Audio DeepFake Detection"
)

interface.launch()