@echo off setlocal cd /d "%~dp0" echo ============================================================ echo Publish public Hugging Face research release v1.0.0 echo Target: PureOne/dirichlet-tree-polya-equality-rigidity echo ============================================================ echo. where py >nul 2>nul if %ERRORLEVEL%==0 ( set "PY=py" ) else ( where python >nul 2>nul if not %ERRORLEVEL%==0 ( echo ERROR: Python was not found in PATH. pause exit /b 1 ) set "PY=python" ) %PY% -c "import huggingface_hub" >nul 2>nul if not %ERRORLEVEL%==0 ( echo Installing/upgrading Hugging Face Hub client... %PY% -m pip install --upgrade "huggingface_hub>=0.30" if not %ERRORLEVEL%==0 ( echo ERROR: could not install huggingface_hub. pause exit /b 1 ) ) echo. echo Your WRITE token will be requested with hidden input by Python. echo The token is not stored in this release directory. echo. %PY% publish_huggingface.py set "RC=%ERRORLEVEL%" echo. if "%RC%"=="0" ( echo Publication finished successfully. ) else ( echo Publication failed with exit code %RC%. ) pause exit /b %RC%