# Deploy Week 8 "The Price is Right" to Hugging Face Space: prabalGaur/Capstone #Run: powershell -ExecutionPolicy Bypass -File week8/deploy_to_hf.ps1 $ErrorActionPreference = "Stop" $Week8 = "$PSScriptRoot" $DeployDir = "$Week8\_hf_deploy" Write-Host "=== Preparing deployment bundle (no 1.1GB weights file) ===" -ForegroundColor Cyan if (Test-Path $DeployDir) { Remove-Item $DeployDir -Recurse -Force } New-Item -ItemType Directory -Path $DeployDir | Out-Null New-Item -ItemType Directory -Path "$DeployDir\agents" | Out-Null Copy-Item "$Week8\price_is_right.py" $DeployDir Copy-Item "$Week8\deal_agent_framework.py" $DeployDir Copy-Item "$Week8\log_utils.py" $DeployDir Copy-Item "$Week8\free_config.py" $DeployDir Copy-Item "$Week8\env_utils.py" $DeployDir Copy-Item "$Week8\memory.json" $DeployDir Copy-Item "$Week8\huggingface_space\app.py" $DeployDir Copy-Item "$Week8\huggingface_space\requirements.txt" $DeployDir Copy-Item "$Week8\huggingface_space\README.md" $DeployDir Get-ChildItem "$Week8\agents\*.py" | Copy-Item -Destination "$DeployDir\agents\" Copy-Item "$Week8\products_vectorstore" $DeployDir -Recurse Write-Host "Uploading to prabalGaur/Capstone via Hugging Face API..." -ForegroundColor Cyan Set-Location (Split-Path $Week8 -Parent) uv run python -c @" from huggingface_hub import HfApi api = HfApi() api.upload_folder( folder_path=r'$DeployDir', repo_id='prabalGaur/Capstone', repo_type='space', commit_message='Deploy capstone app (Frontier + Groq specialist, no 1GB weights)', ) print('Upload complete!') "@ Write-Host "" Write-Host "Live URL: https://huggingface.co/spaces/prabalGaur/Capstone" -ForegroundColor Green Write-Host "" Write-Host "Add Space SECRETS (Settings -> Secrets):" -ForegroundColor Yellow Write-Host " GROQ_API_KEY, HF_TOKEN, USE_MODAL_SPECIALIST=false" Write-Host " GRADIO_SERVER_NAME=0.0.0.0" Write-Host " PRICER_PREPROCESSOR_MODEL=groq/llama-3.1-8b-instant"