Spaces:
Running
on
CPU Upgrade
Improve name of the model detection to allow several URL usages
To avoid the following error huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name'
when submitting the URL of the model repository in the following forms:
Can you give an example of a real URL that has https://huggingface.co./spaces/hf-accelerate/model-memory-usage/foo
? I've never seen this format on HF before (if you're implying a raw url that could go to a file in a repo, not sure we'd want to support that)
It is more an UX matter, to improve usability. As you said, at HuggingFace the URL model name is usually referenced as https://huggingface.co./namespace/repo_name". My patch is to allow the use of the app even if the user use the URL in a different format than the HF validator needs ('repo_name' or 'namespace/repo_name'). Reading my previous comment, I made a mistake with the URL example (I have updated the examples), please see again the following table to see the URL that are now and would be accepted with this patch: