Spaces:
Runtime error
Runtime error
| # Restart HuggingFace Space to trigger rebuild | |
| # The Space will pull the latest code from the repository | |
| SPACE_ID="jeanbaptdzd/linguacustodia-financial-api" | |
| HF_TOKEN="${HF_TOKEN:-$(grep HF_TOKEN .env | cut -d '=' -f2)}" | |
| if [ -z "$HF_TOKEN" ]; then | |
| echo "β HF_TOKEN not found" | |
| echo "Please set HF_TOKEN environment variable or add it to .env file" | |
| exit 1 | |
| fi | |
| echo "π Restarting HuggingFace Space: $SPACE_ID" | |
| echo "==========================================" | |
| curl -X POST "https://huggingface.co/api/spaces/$SPACE_ID/restart" \ | |
| -H "Authorization: Bearer $HF_TOKEN" \ | |
| -H "Content-Type: application/json" | |
| echo "" | |
| echo "==========================================" | |
| echo "β Restart request sent!" | |
| echo "π Space URL: https://huggingface.co/spaces/$SPACE_ID" | |
| echo "β³ Waiting 60 seconds for Space to rebuild..." | |
| sleep 60 | |
| echo "" | |
| echo "π§ͺ Testing the /test/model-configs endpoint..." | |
| curl -s "https://jeanbaptdzd-linguacustodia-financial-api.hf.space/test/model-configs" | python3 -m json.tool | |
| echo "" | |
| echo "β Test complete!" | |