Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
5.41.0
π Deployment Guide
Deploy to Hugging Face Spaces
Prerequisites
- Install Hugging Face CLI:
pip install huggingface_hub
- Login to Hugging Face:
huggingface-cli login
Create and Deploy Space
- Create a new Space on Hugging Face Hub:
huggingface-cli repo create --type space --space_sdk gradio your-username/one-pager-generator
- Clone and set up the repository:
git clone https://huggingface.co/spaces/your-username/one-pager-generator
cd one-pager-generator
- Copy files to the Space repository:
cp ../one-pager/* .
- Add, commit and push:
git add .
git commit -m "Initial commit: AI One-Pager Generator"
git push
Alternative: Direct CLI Upload
You can also use the HF CLI to upload files directly:
huggingface-cli upload your-username/one-pager-generator . --repo-type=space
Files Required for Deployment
app.py
- Main application filerequirements.txt
- Python dependenciesconfig.yaml
- Space configurationREADME.md
- Documentation.gitignore
- Git ignore patterns
Configuration Notes
- The app uses
distilgpt2
model for better compatibility - CPU-only inference for free tier compatibility
- Fallback template system ensures reliable output
- Gradio interface optimized for Spaces
Post-Deployment
After deployment, your Space will be available at:
https://huggingface.co/spaces/your-username/one-pager-generator
The app will automatically:
- Install dependencies from requirements.txt
- Load the AI model
- Launch the Gradio interface
- Be accessible via the web
Troubleshooting
- Model loading issues: The app falls back to structured templates
- Memory issues: Using smaller DistilGPT2 model for efficiency
- Timeout issues: CPU inference may be slower but more reliable