This is a Flask-based application that uses Cloudinary's API for image management, tagging, and generating image recommendations based on user-selected content.
- Image Upload: Automatically uploads images from a local directory to Cloudinary, tagging them with AI-powered categorization (AWS Rekognition).
- Dynamic Recommendations: Suggests additional images based on shared tags with user-selected images.
- Optimized Image Display:
- Images are transformed dynamically for consistent quality and format.
- Delivered via Cloudinary’s CDN for optimal performance.
- Image Upload:
- Images in the
Images
directory are uploaded to Cloudinary with auto-tagging enabled. - Images are stored in a
tagged_images
folder with relevant tags.
- Images in the
- Homepage (/):
- Displays up to 10 uploaded images.
- Users can select images to receive recommendations.
- Recommendations Page (/output):
- Based on selected images, the app analyzes tags and suggests similar images.
You can use this app without any setup!
However, if you want to work off of your own product environment:
- Sign up for a free Cloudinary account.
- Register for the Google Tagging and Amazon Rekognition AI Moderation add-ons.
- Remix it on Glitch.
- Enter your API Environment Variable value (can be found on the API Keys page of the Cloudinary Console) in the
.env
file of your Glitch directory. - Place images in an
Images
folder at the root of the project.
- Clone this GitHub repository.
- Install the required Python packages:
pip install flask cloudinary requests
- Place images in an
Images
folder at the root of the project. - Run the app.
app.py
: Core Flask app handling routing, image uploads, and recommendations.templates/index.html
: Displays uploaded images for selection.templates/output.html
: Shows recommended images based on user-selected tags.
This app uses the following libraries:
- Flask: Python web framework.
- Cloudinary: For image management and transformations.
urllib3
: HTTP client for accessing Cloudinary lists.collections
: For counting tag frequencies.ssl
: For handling secure HTTP requests.