AI Story Card (#CloudflareAIDevChallenge)
Create Stories in a card with illustrations using AI. Created as part of Cloudflare AI Dev Challenge.
Blog Post - https://dev.to/anselm94/fun-beautiful-printable-story-cards-for-kids-with-cloudflare-ai-3fbf
Note
This project won Cloudflare AI Challenge under 'Multiple Models' prize category winner - Dev.to Announcement Post 😉
Demo - https://cf-challenge-ai-storycard.pages.dev
-
Safe for Kids If any inappropriate content is detected, the story card will be marked as "unsafe" with a blurred preview image.
-
Collaborate with friends The url for a storycard is valid for a day. Comeback, edit and download it anytime within 24 hours.
- Text Generation -
mistral-7b-instruct-v0.2
- Image Generation -
stable-diffusion-xl-base-1.0
- Translation -
m2m100-1.2b
- Image to Text -
uform-gen2-qwen-500m
- Text Content Moderation -
llamaguard-7b-awq
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Note
The
AI
binding in Wrangler currently doesn't work while working locally
- Create a Cloudflare account
- Create an application under 'Workers & Pages'
- Create a KV namespace
- Create an R2 bucket
- Update the
wrangler.toml
file with right KVid
and R2bucket_name
- Finally, login Wrangler into Cloudflare account by
npx wrangler login
- Build the app
npm run build
- Deploy the app
npm run deploy