Error in Unit 3 Agentic Rag

#6
by rohilrao - opened

The HF Space developed for this unit fails with a runtime error.

I am getting the same error.

same here, something related to an authentication error, at least for me

I think the hf token stored in the settings is invalidated or expired.
I suggest to clone the space and add your own HF token.

The code is OK. I was able to clone the repo and run it successfully using my personal HF Read token

The code runs fine, In my case, my space tokens were misconfigured.

steps to fix

  1. Create new read token https://huggingface.co/settings/tokens
    with permissions:
    Read access to contents of all repos under your personal namespace
    Read access to contents of all public gated repos you can access
    Make calls to Inference Providers
    Make calls to your Inference Endpoints

  2. Set your token so the code can use it
    Settings > scroll down to "Variables and secrets"

  • Important -> delete any other old secrets if exist
  • add new secret
    name it HUGGINGFACEHUB_API_TOKEN and add the token value

Hi, @alisamak -- thank you for posting the instructions. I'm new to Spaces and testing to find my way. I removed the Read-access criteria from your suggestion and had functionality. Any tips as to why you'd want to include these? Thanks

Hi @makinuh -- I'm new to spaces too, in my case I had this setting as default, so thats why I included it in the answer, but I agree it probably might work without this permission.

@alisamak Thank you for the steps. My issue was around the old token. Once I created a new token and cloned the space as a Public space, things started working.

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment