video loader use generic methods and auth

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-08-16 09:02:40 +02:00
parent 12bf006b00
commit cd25a5296a
7 changed files with 45 additions and 72 deletions
+1 -1
View File
@@ -48,7 +48,6 @@ def hf_login(token=None):
except Exception:
pass
try:
# with contextlib.nullcontext():
with contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):
hf.login(token=token, add_to_git_credential=False)
except Exception as e:
@@ -56,6 +55,7 @@ def hf_login(token=None):
text = (stdout.getvalue() or '') + (stderr.getvalue() or '')
try:
new_token = hf.get_token()
os.environ['HF_TOKEN'] = new_token
except Exception:
pass
obfuscated_token = 'hf_...' + new_token[-4:]