✨ AI Fairytale generator

programORdie - Apr 10 - - Dev Community

This is a submission for the Cloudflare AI Challenge.

What I Built

A cool site where you can upload an image, select a language, let the AI do it's magic and receive a fairytale about that image, in your selected language, with 2 images!

Demo

⭐ Check it out here!
GIF

My Code

💻 If you want to see my code, here it is: https://github.com/programORdie2/fairytaleAI

Journey

🚀 During this journey, I explored cloudflare workers and AI models. I only used pages before, so it was a whole new experience for me!

📚 Everything was very well documented, what made it very easy to use multiple models.

🧠 I really learned a lot of this challenge, and as soon as a text-to-speech model is available, I'm going to add this feature too. 🎙️

Multiple Models and/or Triple Task Types

I used triple task types (see the tabel) and multiple models (text generation), here is the list:

Type Name
Image-to-text @cf/unum/uform-gen2-qwen-500m
text generation (SFE check) @hf/nousresearch/hermes-2-pro-mistral-7b
Text generation @cf/meta/llama-2-7b-chat-int8
Translation @cf/meta/m2m100-1.2b
text generation (prompt generation) @hf/google/gemma-7b-it
Image generation @cf/lykon/dreamshaper-8-lcm

That's it, if you have any feedback or questions, please let me know in the comments!

. . . . . .
Terabox Video Player