#!/bin/bash # Script to monitor Hugging Face Space logs # Usage: ./monitor-logs.sh [run|build] TYPE=${1:-run} if [ "$TYPE" != "run" ] && [ "$TYPE" != "build" ]; then echo "Usage: $0 [run|build]" exit 1 fi if [ -z "$HF_TOKEN" ]; then echo "Warning: HF_TOKEN is not set. Authorization may fail if the Space is private." fi echo "Streaming $TYPE logs for HuuDatLego/Unicode..." curl -N \ -H "Authorization: Bearer $HF_TOKEN" \ "https://huggingface.co/api/spaces/HuuDatLego/Unicode/logs/$TYPE"