fish-speech
fish-speech copied to clipboard
[Feature] WebUI improvement: handling empty input boxes
In the current version (v1.0.0), if some input boxes are left empty, WebUI will still send the inference command to the backend, causing a RuntimeError: torch.cat(): expected a non-empty list of Tensors error, while the WebUI simply displays an default "Error" text.
To improve user experience, I suggest adding a validation function to handle empty input boxes. This would display a friendlier error message in the WebUI. Just an example:
def validate_input(text: str) -> bool:
if not text:
raise gr.Error("Please ensure that <InputBox1> is not left empty.")
return True
( •̀ ω •́ )✧
Sounds good, fixed.