Spaces:
Runtime error
Issue with Prolonged Build Time on Hugging Face Space Deployment
Hello community,
I am currently working on a project titled "Email Classification and PII Masking API" and deploying it on Hugging Face Spaces. However, I am facing an issue where the build process is taking an unusually long time to complete.
Details of the Issue:
The build process has been stuck in the "Building..." status for over an hour.
Logs indicate that the following steps are executed successfully:
Dependencies are installed through pip install (including the SpaCy model en_core_web_sm).
Cache is restored, and necessary directories are created (saved_models).
The image is prepared for pushing.
The error occurs during the "Pushing image" step, where I get the following error:
Code
ERROR: failed to push spaces-registry.huggingface.tech/spaces/... unexpected status from HEAD request: 401 Unauthorized
Steps I Have Tried:
Verified that my Hugging Face API token is valid and has the necessary permissions.
Logged in to Hugging Face CLI using huggingface-cli login and ensured authentication is set up.
Restarted the build process multiple times, but the issue persists.
Simplified the pipeline and scripts to reduce resource usage, but it didn’t resolve the problem.
Request for Help:
Has anyone else experienced prolonged build times or similar 401 Unauthorized errors during the deployment process?
Are there additional configurations or steps I should verify for successful deployment?
Any suggestions or insights on resolving this issue would be greatly appreciated.
Here’s the link to the Space I am working on: email-pii-classifier-v2.
Thank you in advance for your help!

