meme / README.md
qwqcc's picture
Upload 4 files
a7eca70 verified
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-space folder to the Space repo root.
  • In the Space settings, add Secrets:
    • TRANSLATOR_PROVIDER = openai
    • OPENAI_BASE_URL = https://api.openai.com/v1
    • OPENAI_API_KEY = sk-*** (do not hardcode)
    • OPENAI_MODEL = gpt-4.1-mini
    • (Optionally) MEME_DATA_DIR if 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_generator and contributions under /app/meme-generator-contrib and /app/meme_emoji.
  • No secrets are baked into the image; configure them via Space Secrets.