function isValidHfModelId(string) {
    if (!REPO_ID_REGEX.test(string)) return false;
    if (string.includes("..") || string.includes("--")) return false;
    if (string.endsWith(".git") || string.endsWith(".ipynb")) return false;
    return true;
}
Tests whether a string is a valid Hugging Face model ID or not.
Adapted from https://github.com/huggingface/huggingface_hub/blob/6378820ebb03f071988a96c7f3268f5bdf8f9449/src/huggingface_hub/utils/_validators.py#L119-L170

@param {string} string The string to test
@returns {boolean} True if the string is a valid model ID, false otherwise.