Skip to content

Commit

Permalink
login for hf token
Browse files Browse the repository at this point in the history
  • Loading branch information
dleviminzi committed Nov 4, 2024
1 parent f526ef0 commit 429a6ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdk/src/beta9/abstractions/integrations/vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,12 @@ def __call__(self, *args: Any, **kwargs: Any):
f"{self.engine_config.download_dir}/{chat_template_filename}"
)

if "HF_TOKEN" in os.environ:
hf_token = os.environ["HF_TOKEN"]
import huggingface_hub

huggingface_hub.login(hf_token)

app = FastAPI()

@app.get("/health")
Expand Down

0 comments on commit 429a6ad

Please sign in to comment.