Update webui.py
Browse files
webui.py
CHANGED
|
@@ -5,11 +5,11 @@ import soundfile as sf
|
|
| 5 |
from pathlib import Path
|
| 6 |
import separate
|
| 7 |
|
| 8 |
-
def audio_model_inference(
|
| 9 |
-
filename =
|
| 10 |
# 执行调用
|
| 11 |
audio_worker = separate.Predictor(args={
|
| 12 |
-
"files":
|
| 13 |
"output": Path(output_folder),
|
| 14 |
"model_path": Path(model_path),
|
| 15 |
"denoise": denoise,
|
|
@@ -45,7 +45,7 @@ def audio_model_inference(files, output_folder, model_path, denoise, margin, chu
|
|
| 45 |
|
| 46 |
# Gradio 界面组件
|
| 47 |
inputs = [
|
| 48 |
-
gr.File(label="源音频文件", type='filepath', file_count=
|
| 49 |
gr.Textbox(label="输出文件夹", value="./"),
|
| 50 |
gr.Textbox(label="模型路径", value="./models/MDX_Net_Models/UVR-MDX-NET-Inst_HQ_3.onnx"),
|
| 51 |
gr.Checkbox(label="启用降噪", value=False),
|
|
|
|
| 5 |
from pathlib import Path
|
| 6 |
import separate
|
| 7 |
|
| 8 |
+
def audio_model_inference(file, output_folder, model_path, denoise, margin, chunks, n_fft, dim_t, dim_f):
|
| 9 |
+
filename = Path(file).split('/')[-1]
|
| 10 |
# 执行调用
|
| 11 |
audio_worker = separate.Predictor(args={
|
| 12 |
+
"files": Path(file),
|
| 13 |
"output": Path(output_folder),
|
| 14 |
"model_path": Path(model_path),
|
| 15 |
"denoise": denoise,
|
|
|
|
| 45 |
|
| 46 |
# Gradio 界面组件
|
| 47 |
inputs = [
|
| 48 |
+
gr.File(label="源音频文件", type='filepath', file_count=1),
|
| 49 |
gr.Textbox(label="输出文件夹", value="./"),
|
| 50 |
gr.Textbox(label="模型路径", value="./models/MDX_Net_Models/UVR-MDX-NET-Inst_HQ_3.onnx"),
|
| 51 |
gr.Checkbox(label="启用降噪", value=False),
|