Spaces:
Sleeping
Sleeping
mystic_CBK
FIXED: Use exactly compatible versions - omegaconf 1.3.2, PyTorch 1.12.1, transformers 4.21.0. No patching needed, proven compatibility.
f898400
| # ECG-FM API Deployment Script | |
| # This script helps deploy your ECG-FM API to Hugging Face Spaces | |
| echo "π ECG-FM API Deployment Script" | |
| echo "================================" | |
| # Check if we're in the right directory | |
| if [ ! -f "server.py" ] || [ ! -f "Dockerfile" ] || [ ! -f "requirements.txt" ]; then | |
| echo "β Error: Please run this script from the ECG-FM directory containing server.py, Dockerfile, and requirements.txt" | |
| exit 1 | |
| fi | |
| echo "β Found all required files" | |
| echo "" | |
| # Check if git is initialized | |
| if [ ! -d ".git" ]; then | |
| echo "π Initializing git repository..." | |
| git init | |
| git remote add origin https://huggingface.co/spaces/mystic-cbk/ecg-fm-api | |
| echo "β Git repository initialized" | |
| else | |
| echo "β Git repository already exists" | |
| fi | |
| echo "" | |
| echo "π Current git status:" | |
| git status | |
| echo "" | |
| echo "π§ Adding all files to git..." | |
| git add . | |
| echo "" | |
| echo "πΎ Committing changes..." | |
| git commit -m "Update ECG-FM API deployment" | |
| echo "" | |
| echo "π Pushing to Hugging Face Spaces..." | |
| git push origin main | |
| echo "" | |
| echo "β Deployment initiated!" | |
| echo "" | |
| echo "π Next steps:" | |
| echo "1. Go to: https://huggingface.co/spaces/mystic-cbk/ecg-fm-api" | |
| echo "2. Watch the build logs in the 'Build logs' tab" | |
| echo "3. Wait for build to complete (5-15 minutes)" | |
| echo "4. Test your API with: python test_client.py" | |
| echo "" | |
| echo "π Your API will be available at:" | |
| echo " https://mystic-cbk-ecg-fm-api.hf.space" | |
| echo "" | |
| echo "π± Test endpoints:" | |
| echo " - Health: https://mystic-cbk-ecg-fm-api.hf.space/healthz" | |
| echo " - Root: https://mystic-cbk-ecg-fm-api.hf.space/" | |
| echo " - Predict: POST https://mystic-cbk-ecg-fm-api.hf.space/predict" | |