Generative Ai
Introducing the Rails Superhero Card Generator
Introduction
Ever felt like a superhero after solving a tricky bug or implementing a complex feature in your Rails application? What if you could capture that moment with your own custom superhero card?
We’re immortalizing those heroic coding moments with our new Rails Superhero Card Generator! This AI-powered tool creates personalized superhero cards featuring your photo and a catchy superhero name that reflects your coding prowess.
Navigate to the Rails Superhero Card Generator , tell it your superhero skills, upload a picture and generate your custom hero card!
How it Works
The Rails Superhero Card Generator combines the power of large language models (LLMs) and image generation models to create custom cards from a provided picture.
It is a very small application with a pretty simple flow:

Stack
The Rails Superhero Card Generator is built using:
- Python and FastAPI for the backend service that handles the AI interactions.
- React with MaterialUI for the frontend interface.
- LlamaIndex for the orchestration of the LLM and image generation models.
- OpenAI’s
gpt-4o-minifor generating superhero names andgpt-image-1for the image generation.
You can see the code in the rails-superhero-cards repository on GitHub .
AI Workflow
The generator works with a pretty straightforward workflow:

The first step is judging whether the query coming from the user is fit for purpose or contains content we don’t want to process. This is a simple classification task that we delegate to the LLM and provides a simple gateway to filter out inappropriate content.
Then we generate a superhero name based on the user’s input using a simple call to the LLM.
Next, we generate the superhero card image using the image generation model, providing it with the user’s picture and the user’s query as context.
Finally, the card image is created from the generated image and the superhero name, and returned to the user.
The workflow is implemented in the backend/workflow.py file, and is orchestrated using LlamaIndex.
Try it Out!
Not convinced yet? Here are the heroes behind our awesome team:

Check out the Rails Superhero Card Generator , upload your picture, and create your own superhero card today!
Have an idea to improve the generator? Found a bug? Feel free to open an issue or a pull request on the GitHub repository .
Have an idea for another awesome AI-tool? Something else entirely? Reach out to us !