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
This commit is contained in:
projects-g
2024-04-19 10:30:45 +05:30
committed by GitHub
parent 72b22d1005
commit 63502becd6

View File

@@ -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
)