hadadrjt's picture
Pocket TTS: Let's take this seriously.
5da0109
raw
history blame contribute delete
674 Bytes
#
# SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
# SPDX-License-Identifier: Apache-2.0
#
from config import HF_TOKEN
from huggingface_hub import login
def authenticate_huggingface():
if HF_TOKEN:
try:
login(token=HF_TOKEN, add_to_git_credential=False)
print("Authenticated with Hugging Face")
except Exception as authentication_error:
print(f"Hugging Face authentication failed: {authentication_error}")
print("Voice cloning may not be available")
else:
print("Missing Hugging Face authentication required for the license agreement")
def get_huggingface_token():
return HF_TOKEN