Spaces:
Sleeping
Sleeping
File size: 1,627 Bytes
bae6e88 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# 🚀 Hugging Face Spaces Deployment
## Quick Start
1. **Go to**: https://huggingface.co/spaces
2. **Click**: "Create new Space"
3. **Select**: **Docker** SDK ✅
4. **Connect**: Your GitHub repository `KBSSRIKARVIT/heart-attack-risk-ensemble`
5. **Wait**: 5-10 minutes for build
6. **Done**: Your app is live!
## SDK Selection
When creating the space, you'll see three options:
1. **Gradio** - For Gradio apps (not this one)
2. **Docker** - ✅ **Select this one!** (for Streamlit)
3. **Static** - For static HTML sites (not this one)
## Why Docker?
- ✅ Your app is a Streamlit app
- ✅ You have a `Dockerfile` ready
- ✅ Docker SDK supports Streamlit
- ✅ More control over the environment
## What Happens
1. Hugging Face pulls your code from GitHub
2. Builds Docker image using your `Dockerfile`
3. Runs the container with Streamlit
4. Maps port 7860 to web interface
5. 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 `PORT` environment 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! 🎉
|