Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to provide HuggingFace-token via environment variable #477

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

niwa2
Copy link
Contributor

@niwa2 niwa2 commented Jan 24, 2025

Related issues / PRs. Summarize issues.

  • when running Whisper-WebUI from docker, the cache folder for the huggingface diarization moddel is not a persistent folder. That means with every restart of the docker container, the hugging face token needs to be provided again via Gradio Webinterface so that the speaker diarization model can be downloaded again.

Summarize Changes

  1. if the hugging face token is empty, then try to grab it from the environment variable "HF_TOKEN"

With this change it is possible to provide the HF token via environment variable to the docker container and does not have to be entered every time the docker container is restarted

this is especially usefull for docker environments, where the hugging face cache folder, that stores the diarization model is not persistent
@jhj0517 jhj0517 added the enhancement New feature or request label Jan 24, 2025
@jhj0517
Copy link
Owner

jhj0517 commented Jan 24, 2025

Thank you!

@jhj0517 jhj0517 merged commit e44f57f into jhj0517:master Jan 24, 2025
9 checks passed
@niwa2 niwa2 deleted the hf_token_via_env branch January 24, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants