pharma / deploy-pharma-space.bat
gsstec's picture
Upload 5 files
69afc9d verified
Raw
History Blame Contribute Delete
1.58 kB
@echo off
echo ========================================
echo Deploying Pharma PK/PD Space to Hugging Face
echo ========================================
echo.
REM Check if Hugging Face CLI is installed
where huggingface-cli >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Hugging Face CLI not found!
echo Please install it with: pip install huggingface_hub
exit /b 1
)
echo Step 1: Logging in to Hugging Face...
huggingface-cli login
echo.
echo Step 2: Creating/Updating Space...
huggingface-cli repo create gsstec-pharma --type space --space_sdk docker --org gsstec
echo.
echo Step 3: Cloning repository...
if exist temp-pharma-repo rmdir /s /q temp-pharma-repo
git clone https://huggingface.co/spaces/gsstec/gsstec-pharma temp-pharma-repo
echo.
echo Step 4: Copying files...
xcopy /Y /I app.py temp-pharma-repo\
xcopy /Y /I requirements.txt temp-pharma-repo\
xcopy /Y /I .dockerfile temp-pharma-repo\Dockerfile
xcopy /Y /I README.md temp-pharma-repo\ 2>nul
echo.
echo Verifying files copied...
dir temp-pharma-repo
echo.
echo Step 5: Committing and pushing...
cd temp-pharma-repo
git add .
git commit -m "Deploy PK/PD simulation engine"
git push
cd ..
echo.
echo Step 6: Cleaning up...
rmdir /s /q temp-pharma-repo
echo.
echo ========================================
echo Deployment Complete!
echo Space URL: https://huggingface.co/spaces/gsstec/gsstec-pharma
echo API Endpoint: https://gsstec-pharma.hf.space/api/v1/simulate/pkpd
echo ========================================
pause
@REM Made with Bob