Code: Select all
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'C:/Users/FZH91R/PycharmProjects/DudeWheresMyHealing/Pytorch/tf_model.h5'. Use `repo_type` argument if needed.
< /code>
Hier ist mein Code: < /p>
CODE_DIR = os.path.dirname(__file__)
ROOT_DIR = os.path.dirname(CODE_DIR)
MODEL_DIR = os.path.join(ROOT_DIR, "Pytorch")
CONFIG_DIR = os.path.join(ROOT_DIR, "Pytorch")
# Load the model to be used.
path_model = MODEL_DIR + "\tf_model.h5"
print(path_model)
path_config = CONFIG_DIR + "\config.json"
print(path_config)
# Load model from a local source.
tokenizer = AutoTokenizer.from_pretrained(path_model, local_files_only=True)
model = AutoModel.from_pretrained(path_model, config=path_config, local_files_only=True)
Transformers-4.31.0
Wie kann ich diesen Fehler beheben?