demucs / app.py
Ahsen Khaliq
Update app.py
01c8cea
raw
history blame
912 Bytes
import gradio as gr
import os
from pathlib import Path
def inference(audio):
os.mkdir("out",exist_ok=True)
os.system("python3 -m demucs.separate -n demucs48_hq -d cpu " +audio.name+" -o out")
audioname = Path(audio.name).stem
return "./out/demucs48_hq/"+audioname+"/vocals.wav"
title = "Anime2Sketch"
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."
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>"
gr.Interface(
inference,
[gr.inputs.Audio(type="file", label="Input")],
gr.outputs.Audio(type="file", label="Output"),
title=title,
description=description,
article=article
).launch(debug=True)