metadata
title: meme-generator (Docker)
emoji: 😎
colorFrom: purple
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
Hugging Face Space for ghcr.io/1111qwq1111/meme-generator:latest
This Space wraps your published image and adapts it for Spaces (listening on $PORT, default 7860). It also supports translator env variables via Space Secrets.
How to use
- Create a new Space and choose “Docker” as the SDK.
- Push the files from this
hf-spacefolder to the Space repo root. - In the Space settings, add Secrets:
TRANSLATOR_PROVIDER=openaiOPENAI_BASE_URL=https://api.openai.com/v1OPENAI_API_KEY=sk-***(do not hardcode)OPENAI_MODEL=gpt-4.1-mini- (Optionally)
MEME_DATA_DIRif you want a custom data path; default/app/data.
The container will:
- Ensure built-in memes load after the translator monkey‑patch.
- Use your OpenAI‑compatible translator if envs are present, otherwise fallback to upstream behavior.
- Bind the server to
$PORT(7860 by default on Spaces).
Endpoints
- OpenAPI docs:
/docs - Meme APIs:
/memes/<key>/(POST), e.g./memes/dianzhongdian/ - Aggregated metadata (if available):
/memes/static/infos.json,/memes/static/keyMap.json
Notes
- This wrapper assumes your base image provides the Python package
meme_generatorand contributions under/app/meme-generator-contriband/app/meme_emoji. - No secrets are baked into the image; configure them via Space Secrets.