(audio, text, model_choice)
| 253 | |
| 254 | |
| 255 | def inference(audio, text, model_choice): |
| 256 | if audio is None: |
| 257 | raise gr.Error("Please upload an audio file / 请上传音频文件") |
| 258 | if not text or not text.strip(): |
| 259 | raise gr.Error("Please enter a text query / 请输入文本描述") |
| 260 | |
| 261 | if model_choice == "AudioSep-hive": |
| 262 | return separate_audiosep(audio, text) |
| 263 | else: |
| 264 | return separate_flowsep(audio, text) |
| 265 | |
| 266 | |
| 267 | if spaces is not None: |
no test coverage detected