Display Picture Forge — AI-powered avatar generator built with FastAPI and HuggingFace Inference Providers.
Generate unique, high-quality avatars from text descriptions in seconds.
| Feature | Description |
|---|---|
| AI-Powered | FLUX.1-schnell model for fast, high-quality generation |
| Multiple Styles | Realistic, Cartoon, Anime, and Abstract |
| One-Click Download | Instantly save PNG images |
| REST API | Programmatic access via built-in endpoints |
# 1. Install dependencies
pip install -r requirements.txt
# 2. Set your HuggingFace token
export HF_TOKEN="your_token_here"
# 3. Run the server
python server.pyOpen http://localhost:8000 in your browser.
| Variable | Required | Description |
|---|---|---|
HF_TOKEN |
Yes | HuggingFace API token with Inference Providers permission |
Get your token at huggingface.co/settings/tokens. Ensure "Inference Providers" is enabled.
| Endpoint | Method | Description |
|---|---|---|
/api/status |
GET | Check provider connection status |
/api/generate |
POST | Generate an avatar from a prompt |
/api/image/{filename} |
GET | Retrieve a generated image |
curl -X POST http://localhost:8000/api/generate \
-H "Content-Type: application/json" \
-d '{"prompt": "a wise owl", "style": "realistic"}'dpforge/
├── server.py # FastAPI backend
├── requirements.txt # Python dependencies
├── AGENTS.md # Developer documentation
└── static/
├── index.html # Frontend HTML
├── styles.css # Styling
└── app.js # Frontend logic
Your token lacks Inference Providers permission. Create a new token at huggingface.co/settings/tokens and enable the permission.
The model requires 30-60 seconds to load on first request. Subsequent requests are faster.
MIT License. See LICENSE for details.