Ahsen Khaliq commited on
Commit
1b3b97a
1 Parent(s): 5019931

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+ def inference(audio):
5
+ os.system('./separate_scripts/separate_vocals.sh ' + audio.name + ' "sep_vocals.mp3"')
6
+ os.system('./separate_scripts/separate_accompaniment.sh ' + audio.name + ' "sep_accompaniment.mp3"')
7
+ return 'sep_vocals.mp3', 'sep_accompaniment.mp3'
8
+ title = "audiosplit"
9
+ description = "demo for Anime2Sketch. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
10
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2104.05703'>Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis</a> | <a href='https://github.com/Mukosame/Anime2Sketch'>Github Repo</a></p>"
11
+
12
+ gr.Interface(
13
+ inference,
14
+ gr.inputs.Audio(type="file", label="Input"),
15
+ [gr.outputs.Audio(type="file", label="Vocals"),gr.outputs.Audio(type="file", label="Accompaniment")],
16
+ title=title,
17
+ description=description,
18
+ article=article,
19
+ enable_queue=True
20
+ ).launch(debug=True)