|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
set -e |
|
|
|
|
|
echo "๐ Neural Pong - Hugging Face Space Setup" |
|
|
echo "==========================================" |
|
|
echo "" |
|
|
|
|
|
|
|
|
if [ ! -f "app.py" ] || [ ! -f "Dockerfile" ]; then |
|
|
echo "โ Error: Please run this script from the toy-wm-hf-space directory" |
|
|
exit 1 |
|
|
fi |
|
|
|
|
|
|
|
|
if [ ! -f "checkpoints/ckpt-step=053700-metric=0.00092727.pt" ]; then |
|
|
echo "โ Error: Checkpoint file not found!" |
|
|
echo " Expected: checkpoints/ckpt-step=053700-metric=0.00092727.pt" |
|
|
exit 1 |
|
|
fi |
|
|
|
|
|
echo "โ
Checkpoint file found" |
|
|
echo "โ
All required files present" |
|
|
echo "" |
|
|
|
|
|
|
|
|
if [ ! -d ".git" ]; then |
|
|
echo "๐ฆ Initializing git repository..." |
|
|
git init |
|
|
echo "โ
Git initialized" |
|
|
else |
|
|
echo "โ
Git repository already initialized" |
|
|
fi |
|
|
|
|
|
echo "" |
|
|
echo "๐ Next steps:" |
|
|
echo "" |
|
|
echo "1. Create a Hugging Face Space:" |
|
|
echo " - Go to https://huggingface.co/spaces" |
|
|
echo " - Click 'Create new Space'" |
|
|
echo " - Name: neural-pong (or your choice)" |
|
|
echo " - SDK: Docker" |
|
|
echo " - Hardware: GPU (T4 small or larger)" |
|
|
echo "" |
|
|
echo "2. Add the remote and push:" |
|
|
echo " git remote add origin https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME" |
|
|
echo " git add ." |
|
|
echo " git commit -m 'Initial commit'" |
|
|
echo " git push -u origin main" |
|
|
echo "" |
|
|
echo "3. Wait for build (5-15 minutes)" |
|
|
echo "" |
|
|
echo "๐ For detailed instructions, see SETUP_GUIDE.md" |
|
|
echo "" |
|
|
|