I Built an AI Palm Reader with Grok-4 Vision and Streamlit – and It Actually Works Shockingly Well
Upload Your Hand, Get Roasted by a Multimillion-Parameter Mystic – Grok-4 Reads Palms Better Than Your Therapist Reads You
I got a little carried away and built something ridiculously fun: an AI-powered palm reader that uses Grok-4’s vision capabilities to analyze a photo of your hand and give you a full, mystical, surprisingly insightful palm reading — complete with hand shape analysis, lifeline interpretations, love predictions, and dramatic emojis.
Meet AI Palm Reader → A free, open-source web app powered by xAI’s Grok-4.
🔗 Live demo & full source code:
https://github.com/rod-trent/JunkDrawer/tree/main/Palm%20Reader
(Yes, it’s in my infamous “JunkDrawer” repo — where all the best weird ideas go.)
What It Actually Does
You upload a clear photo of your open palm → click one button → Grok-4 (the multimodal version) studies your actual palm lines, mounts, finger lengths, and hand shape → delivers a beautifully formatted, detailed palm reading in seconds.
Example output (real response from the app):
✨ Your Hand Type: Fire Hand
Long palm, short fingers — you’re a natural leader, passionate, impulsive, and creative!❤️ Heart Line
Long and curved — you love deeply and wear your heart on your sleeve. Expect intense, dramatic romances!🧠 Head Line
Slightly downward curve — imaginative and intuitive. You think outside the box (and sometimes live there).🌟 Life Line
Strong, deep, and long — vitality for days. You’ll live a full, adventurous life.
It’s spooky how accurate it can be — and hilariously entertaining even when it’s not.
Tech Stack (Simple & Powerful)
Streamlit – for the instant web UI (literally <100 lines of real code)
Grok-4 – xAI’s latest multimodal model (vision + text)
xAI API – official endpoint with image understanding
Pillow + base64 – to properly encode the image for the API
That’s it. No React. No backend. No complicated auth. Just pure weekend-project joy.
Requirements to Run It Locally
Python 3.8+
An xAI API key (get one at https://console.x.ai)
A
.envfile with your key
How to Run It (Takes 2 Minutes)
# 1. Clone the repo
git clone https://github.com/rod-trent/JunkDrawer.git
cd JunkDrawer/Palm Reader
# 2. Install dependencies
pip install streamlit python-dotenv pillow requests
# 3. Create .env file in the folder
echo “XAI_API_KEY=your_actual_key_here” > .env
# 4. Run it!
streamlit run Palm.pyThat’s it. The app will open in your browser at
http://localhost:8501
How to Use It (Best Results)
Put your dominant hand palm-up on a plain background
Bright, even lighting (natural light works great)
Fingers relaxed and slightly spread (don’t clench!)
Take the photo straight-on, fill the frame with your hand
Upload → click “Read My Palm 🔮”
Prepare to be mildly unnerved by how much it knows
Pro tip: Left hand = what you’re born with. Right hand = what you do with it. Try both!
Why This Is More Than Just a Toy
Yes, it’s for entertainment — but Grok-4’s vision is legitimately impressive here. It can:
Distinguish Earth/Air/Fire/Water hand shapes accurately
Trace and interpret the major lines (even faint ones)
Notice mounts (Venus, Jupiter, etc.)
Spot unusual markings (stars, crosses, islands)
Read relative finger lengths and phalange ratios
It’s not cheating — it’s actually looking at your palm like a real palmist would.
Try It Yourself!
Permanent home:
https://github.com/rod-trent/JunkDrawer/tree/main/Palm%20Reader
Deploy it on Streamlit Community Cloud, Railway, Hugging Face Spaces — anywhere. It’s literally one file (Palm.py).
I’ve already had people message me saying “wait… how did it know I changed careers twice??” and “it literally described my ex.”
Palm reading + frontier AI = chaos magic.
Go upload your hand. I dare you.
And if Grok tells you you’re destined for greatness… well, you heard it here first. ✨
— Rod Trent
(Professional nerd & part-time digital fortune teller)



