From 63502becd6cfc59ceb2c15ad53451f9841cc0229 Mon Sep 17 00:00:00 2001 From: projects-g <63178974+projects-g@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:30:45 +0530 Subject: [PATCH] Move HF_token to modal secret (#354) * update all modal deployments and change seamless configuration due to change in src repo * add fixture * move token to secret --- server/gpu/modal/reflector_diarizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/gpu/modal/reflector_diarizer.py b/server/gpu/modal/reflector_diarizer.py index b1989a11..1a0e9f0a 100644 --- a/server/gpu/modal/reflector_diarizer.py +++ b/server/gpu/modal/reflector_diarizer.py @@ -11,7 +11,7 @@ from pydantic import BaseModel PYANNOTE_MODEL_NAME: str = "pyannote/speaker-diarization-3.0" MODEL_DIR = "/root/diarization_models" - +HUGGINGFACE_TOKEN = modal.Secret.from_name("my-huggingface-secret") stub = Stub(name="reflector-diarizer") @@ -34,7 +34,7 @@ def download_pyannote_audio(): Pipeline.from_pretrained( "pyannote/speaker-diarization-3.0", cache_dir=MODEL_DIR, - use_auth_token="***REMOVED***" + use_auth_token=HUGGINGFACE_TOKEN )