OSError: You are trying to access a gated repo

Here’s the error I’m getting:

`OSError: You are trying to access a gated repo.

Make sure to have access to it at google/gemma-2b-it · Hugging Face.

401 Client Error. (Request ID: Root=1-661280c7-7263a54a7af5e58f446d3277;ea51e7a1-ae93-40f9-892b-546afb718ac7)

Cannot access gated repo for url https://huggingface.co/google/gemma-2b-it/resolve/main/config.json.

Repo model google/gemma-2b-it is gated. You must be authenticated to access it.

`
This is the streamlit app I’m trying to build:

I’ve created .env file with access_token as well!! but my app is still giving this error.

Hi @Rishi-spec-art

Since you’re deploying to the Community Cloud, can you add your HF access tokens via the Secrets management in Community Cloud?

See the Docs for more details:

Hope this helps!

1 Like

Okayy…Thank You very much sir…:raised_hands:, this worked for me!!
But unfortunately I’m getting another error which goes like:

Gemma's activation function should be approximate GeLU and not exact GeLU.

Changing the activation function to `gelu_pytorch_tanh`.if you want to use the legacy `gelu`, edit the `model.config` to set `hidden_activation=gelu` instead of `hidden_act`. See https://github.com/huggingface/transformers/pull/29402 for more details.
[17:17:20] ❗️ The service has encountered an error while checking the health of the Streamlit app: Get "http://localhost:8501/script-health-check": EOF

And after getting this, my streamit app is saying:

Oh no.
Error running app. If you need help, try the Streamlit docs and forums.

Thanks is advance.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.