An AI-powered photo description app that uses OpenAI's Vision API to analyze and describe images.
- 📷 Drag & drop or click to upload photos
- 🤖 AI-powered image analysis using GPT-4o-mini
- 🎨 Modern graphite black design
- ⚡ Instant analysis - no button needed
- 🔒 Secure API key handling
- Python 3.7+
- OpenAI API Key (Get one here)
-
Clone the repository
git clone https://github.com/Graphicaljerry/Graphicaljerry.github.io.git cd Graphicaljerry.github.io -
Configure your API key
cp config_local.example.py config_local.py
Edit
config_local.pyand add your OpenAI API key:OPENAI_API_KEY = 'sk-proj-YOUR-KEY-HERE'
-
Start the server
python3 test_server.py
-
Open in browser
http://localhost:8001/photo-summarizer.html -
Upload a photo and watch it get analyzed! 🎉
photo-summarizer.html- Frontend interfacetest_server.py- Local development server (Python)server.py- Alternative local serveranalyze-photo.php- PHP backend (for PHP hosting)config.php- PHP configuration (for PHP hosting)config_local.py- Your API key (gitignored - never committed)
GitHub Pages only serves static files - it cannot run backend code (Python/PHP).
To deploy this app online, you have two options:
Deploy the backend to a service that supports Python or PHP:
Python Backend:
- Heroku
- Railway
- PythonAnywhere
- Vercel (with serverless functions)
PHP Backend:
- Any PHP hosting provider
- Heroku
- Traditional web hosting with PHP support
Convert the backend to serverless functions:
- Vercel Functions
- Netlify Functions
- AWS Lambda
- Cloudflare Workers
- ✅ API keys are stored in gitignored files (
config_local.py,config.php) - ✅
.htaccessblocks direct access toconfig.php - ✅ Never commit API keys to git
⚠️ Don't expose API keys in frontend code
Local Development:
- Make sure
test_server.pyis running - Check that
config_local.pyexists and has your API key - Verify your OpenAI API key is valid
- Check the terminal for error messages
Deployed Version:
- Verify your backend server is running
- Check that the frontend is pointing to the correct backend URL
- Verify CORS headers are configured correctly
- Check API key is configured on the server
- Make sure the server is running on port 8001
- Open the browser console (F12) to see detailed errors
- Check that the URL is correct:
http://localhost:8001/photo-summarizer.html
- User uploads photo → Frontend converts image to base64
- Frontend sends to backend → POST request to
/analyze-photo.php - Backend calls OpenAI → Using your API key stored server-side
- AI analyzes image → GPT-4o-mini Vision API processes the image
- Result displayed → Description shown below the photo
# Option 1: Use test_server.py (recommended)
python3 test_server.py
# Option 2: Use server.py
python3 server.py
# Option 3: If you have PHP
php -S localhost:8000- Start the server
- Open http://localhost:8001/photo-summarizer.html
- Upload a test image
- Check server logs for any errors
This project was created with Claude Code.
Feel free to open issues or submit pull requests!
Made with ❤️ and AI