Spaces:
Running
Running
Runtime error 401 – HF_TOKEN not working in Space
#1
by Enjii - opened
Hi community 👋
I have a HuggingFace Space:
https://huggingface.co/spaces/Enjii/world-love-system
I'm getting this error:
401 Unauthorized
Invalid username or password
Client error 401 Unauthorized from https://router.huggingface.co/v1/chat/completions
What I already did:
- Created HF token in https://huggingface.co/settings/tokens
- Added secret in Space settings:
HF_TOKEN = - Restarted Space
- Code uses:
token=os.environ.get("HF_TOKEN")
But it still fails with 401.
Model:
HuggingFaceH4/zephyr-7b-beta
InferenceClient from huggingface_hub
Can someone help me debug this?
Is this model incompatible with chat_completion or auth config wrong?
Thank you 🙏
World Love System - a Hugging Face Space by Enjii
Conscious Ethical Human-Centered AI for humanity
Posláno