roychao19477 commited on
Commit
17efe4f
·
1 Parent(s): feda893
Files changed (1) hide show
  1. app.py +9 -16
app.py CHANGED
@@ -88,19 +88,12 @@ def enhance(filepath):
88
 
89
 
90
 
91
- se_demo = gr.Interface(
92
- fn = enhance,
93
- inputs = [
94
- gr.Audio(label="Input Audio", type="filepath"),
95
- gr.Checkbox(label="Apply Speech Enhancement", value=True),
96
- ],
97
- outputs = [
98
- gr.Audio(label="Output Audio", type="filepath"),
99
- #gr.Plot(label="Spectrogram")
100
- ],
101
- title = "SEMamba",
102
- cache_examples=False,
103
- )
104
-
105
- if __name__ == "__main__":
106
- se_demo.launch()
 
88
 
89
 
90
 
91
+ with gr.Blocks() as demo:
92
+ gr.Markdown(ABOUT)
93
+ input_audio = gr.Audio(label="Input Audio", type="filepath")
94
+ run_button = gr.Button("Enhance")
95
+ output_audio = gr.Audio(label="Enhanced Audio", type="filepath")
96
+
97
+ run_button.click(enhance, inputs=[input_audio], outputs=[output_audio])
98
+
99
+ demo.queue().launch()