Spaces:
Sleeping
Sleeping
|
Download README.md from KarthikAI/StickerGen: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/spaces/KarthikAI/StickerGen/resolve/main/README.md
- Command line
-
hf download hf://spaces/KarthikAI/StickerGen/README.md
-
curl -L -o README.md https://huggingface.co/spaces/KarthikAI/StickerGen/resolve/main/README.md
1.35 kB
metadata
title: StickerGen
emoji: 🚀
colorFrom: indigo
colorTo: pink
sdk: docker
pinned: false
Hugging Face Space: Image to Chibi/Anime/Cartoon Sticker Generator
This Space provides an API endpoint /generate that:
- Accepts an image and a style (chibi, anime, cartoon, etc.).
- Captions the image using BLIP.
- Constructs a DALL·E 3 prompt and calls OpenAI's API to generate a set of stickers.
- Returns the generated sticker image URL.
Flow (Numbered)
- User uploads an image (
image) and specifies a sticker style (style). - App generates a caption using BLIP (image captioning).
- App constructs a DALL·E 3 prompt combining the style and generated caption.
- App sends the prompt to OpenAI DALL·E 3 and retrieves a sticker image URL.
- App returns a JSON containing the caption, prompt, and image URL.
Usage
POST /generate
image: (file, required) — Input image (JPEG/PNG).style: (text, optional, default: "chibi") — Sticker style ("chibi", "anime", "cartoon", etc.).
Response
{
"caption": "...",
"prompt": "...",
"image_url": "..."
}
Requirements
- Hugging Face installs dependencies from
requirements.txt - Set your OpenAI API key as environment variable:
OPENAI_API_KEY=sk-...
Running locally
uvicorn app:app --reload