Public Space - Credentials

Is there a way I can use gradio within a public Hugging Space but add credentials to it?
I’m aware the credentials will be visible in the app.py if I use the auth command, so is there a way to get around this?

Hi @bradley6597 !

You can store the credentials as environment variables in the space and then read them is with os.environ.

Hey @freddyaboulton,

How would I get them into the environment initially on a Hugging Space instance?

You can go to the Settings tab of your space and scroll down to where it says Repository Secrets

space_secrets