token exposed

#1
by radames HF staff - opened
Gradio-Blocks-Party org

Hi @ysharma ,
Just one note, you have your HF token exposed here . You can always set Repo Secrets under Space Settings

Screen Shot 2022-05-25 at 11 32 40

and use this

    HF_TOKEN = os.environ["HF_TOKEN"]
    headers = {"Authorization": f"Bearer {HF_TOKEN}"}
Gradio-Blocks-Party org

Thanks @radames for this insight. Fixed it now :)

ysharma changed discussion status to closed
Gradio-Blocks-Party org

cool! another note, because the token is in the history and it's public, you can always invalidate and refresh it on your personal settings, sorry if you've already done that.

Gradio-Blocks-Party org

Thanks for the on-point suggestions and for your time on this. Can I ask if by 'invalidate and refresh' do you mean restarting the space or factory reboot of the space?

ysharma changed discussion status to open
Gradio-Blocks-Party org

@ysharma you can go to https://huggingface.co/settings/tokens where you can click "Manage" > "Invalidate and refresh" for a given token.

Sign up or log in to comment