Spaces:
Sleeping
Sleeping
🚀 Hugging Face Spaces Deployment
Quick Start
- Go to: https://huggingface.co/spaces
- Click: "Create new Space"
- Select: Docker SDK ✅
- Connect: Your GitHub repository
KBSSRIKARVIT/heart-attack-risk-ensemble - Wait: 5-10 minutes for build
- Done: Your app is live!
SDK Selection
When creating the space, you'll see three options:
- Gradio - For Gradio apps (not this one)
- Docker - ✅ Select this one! (for Streamlit)
- Static - For static HTML sites (not this one)
Why Docker?
- ✅ Your app is a Streamlit app
- ✅ You have a
Dockerfileready - ✅ Docker SDK supports Streamlit
- ✅ More control over the environment
What Happens
- Hugging Face pulls your code from GitHub
- Builds Docker image using your
Dockerfile - Runs the container with Streamlit
- Maps port 7860 to web interface
- Your app is accessible worldwide!
Files Needed
- ✅
Dockerfile- Container configuration - ✅
streamlit_app.py- Main app - ✅
requirements.txt- Dependencies - ✅
model_assets/- Model files - ✅ All other app files
Port Configuration
The Dockerfile is configured to:
- Use
PORTenvironment variable (set by Hugging Face) - Default to port 7860 (Hugging Face standard)
- Also expose port 8051 for compatibility
After Deployment
Your app will be available at:
https://huggingface.co/spaces/KBSSRIKARVIT/heart-attack-risk-predictor
Replace KBSSRIKARVIT with your Hugging Face username and heart-attack-risk-predictor with your space name.
That's it! Select Docker SDK and deploy! 🎉