Spaces in the names of trained models cause parts of the name to be dropped
Steps to reproduce: mkdir -p ./Stub\ backend/models/{stub\ 1,stub\ 2}
In the UI, select backend Stub backend
, model instance stub 1
(note the model name is properly parsed here), and launch the automatic tagging.
An exception is raised and shows that the call to the backend is:
setenv(`poetry run tagging-backend predict --model-instance 1`; dir="./Stub backend")
Expected behavior: The argument after --model-instance
should be "stub 1"
Note that the issue affects the model instance name only, not the backend. Also, the model instance name is properly displayed in the UI.