Spaces:
Sleeping
Sleeping
|
Download DEPLOY.md from snvskiit/content_processor: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/spaces/snvskiit/content_processor/resolve/main/DEPLOY.md
- Command line
-
hf download hf://spaces/snvskiit/content_processor/DEPLOY.md
-
curl -L -o DEPLOY.md https://huggingface.co/spaces/snvskiit/content_processor/resolve/main/DEPLOY.md
1.34 kB
π Quick Deployment to Hugging Face Spaces
Files for Deployment
Upload these 4 files to your Hugging Face Space:
π Your Hugging Face Space Repository
βββ π app.py # Main FastAPI application
βββ π Dockerfile # Container configuration
βββ π README.md # Space description (rename README_HF.md)
βββ π requirements.txt # Python dependencies
βββ π test.py # Test script (optional)
Deployment Steps
1. Create Hugging Face Space
- Go to huggingface.co/spaces
- Click "Create new Space"
- Choose SDK: Docker
- Set your space name
2. Upload Files
- Upload:
app.py,Dockerfile,requirements.txt - Rename
README_HF.mdtoREADME.mdand upload - Optionally upload
test.py
3. Deploy
- Hugging Face automatically builds and deploys
- Your API will be available at:
https://your-space-name.hf.space
Testing
- Update
test.pywith your Space URL - Set environment variable:
export OPENAI_API_KEY="your_key" - Run:
python test.py
Your API Endpoints
- Base:
https://your-space-name.hf.space - Health:
GET /health - Address Detection:
POST /address-detection - Summarization:
POST /summarize - Docs:
GET /docs
That's it! π