Error in Unit 3 Agentic Rag
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
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 EndpointsSet 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
@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.
Just for fun - another user ( @Data-Gem ) has provided an extended invitee list that you can use by going into the retriever.py file and swapping out this line :
FROM
guest_dataset = datasets.load_dataset("agents-course/unit3-invitees", split="train")
TO
guest_dataset = datasets.load_dataset("Data-Gem/agents-course-unit3-invitees-expanded", split="train")
Just for fun - another user ( @Data-Gem ) has provided an extended invitee list that you can use by going into the retriever.py file and swapping out this line :
FROM
guest_dataset = datasets.load_dataset("agents-course/unit3-invitees", split="train")TO
guest_dataset = datasets.load_dataset("Data-Gem/agents-course-unit3-invitees-expanded", split="train")
I think you could adding https://huggingface.co/datasets/agents-course/unit3-invitees
to your collection and edit the data as you need, then change in the code base for correct link
The code runs fine, In my case, my space tokens were misconfigured.
steps to fix
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 EndpointsSet 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
I have tried to follow you instruction, first of all I could not find any "Variables and secrets" in settings. then I anyhow created new space and it did not solve the issue.
it would be great if you can share where can I find the "Variables and secrets"?