File size: 981 Bytes
6d1530f
ed3942b
6d1530f
ed3942b
 
 
 
 
6d1530f
ed3942b
 
6d1530f
ed3942b
 
6d1530f
ed3942b
 
 
 
 
 
 
6d1530f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# app.py
import gradio as gr
from separation_utils import process_audio

interface = gr.Interface(
    fn=process_audio,
    inputs=gr.Audio(type="filepath", label="Upload Audio File"),
    outputs=[
        gr.Audio(type="filepath", label="Foreground Audio 2DFT"),
        gr.Textbox(label="PSNR (dB) 2DFT", interactive=False),
        gr.Textbox(label="KL Divergence 2DFT", interactive=False),
        gr.Audio(type="filepath", label="Foreground Audio Repet"),
        gr.Textbox(label="PSNR (dB) Repet", interactive=False),
        gr.Textbox(label="KL Divergence Repet", interactive=False),
        gr.Audio(type="filepath", label="Foreground Audio Repet Sim"),
        gr.Textbox(label="PSNR (dB) Repet Sim", interactive=False),
        gr.Textbox(label="KL Divergence Repet Sim", interactive=False)
    ],
    title="Audio Foreground Separator",
    description="Upload an audio file to separate its foreground using 2DFT, Repet, and Repet_Sim models."
)

interface.launch()