Move the credentials to the secrets

#13
by jbilcke-hf HF staff - opened

Hi @yizhangliu

I recommend to move your Space variables TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY to Space secrets:
https://huggingface.co/docs/hub/en/spaces-overview#managing-secrets

(you might also want to invalidate/renew the those credentials at the same time, in case somebody copied them)

if you do this security will be better, but when someone duplicate/forks the space, the variables will be missing (which is normal)

so you might also want to change the code a bit to skip attempts to call the Tencent API when those two environment variables are missing (I see that today we try to login on each call?)

Sign up or log in to comment