Vinted Image Search Assistant
import logging
import os
import requests
from gunicorn.app.base import BaseApplication
from app_init import create_initialized_flask_app
from abilities import upload_file_to_storage, url_for_uploaded_file, llm
from flask import render_template, request, redirect, url_for, flash, jsonify
from werkzeug.utils import secure_filename
# Flask app creation should be done by create_initialized_flask_app to avoid circular dependency problems.
app = create_initialized_flask_app()
# Setup logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
@app.route("/")
def home():
return render_template("home.html")
Created: | Last Updated:
Here's a step-by-step guide for using the Vinted Image Search Assistant template:
Introduction
The Vinted Image Search Assistant is a web application that allows users to upload images, analyze them using AI, and search for similar items on Vinted using an API. This template provides a user-friendly interface for image upload and displays search results from Vinted.
Getting Started
- Click "Start with this Template" to begin using the Vinted Image Search Assistant template in the Lazy Builder interface.
Initial Setup
Before running the application, you need to set up an environment secret:
- Go to the Environment Secrets tab in the Lazy Builder.
- Add a new secret with the key
RAPIDAPI_API_KEY
. - To get the value for this key:
- Visit RapidAPI
- Sign up or log in to your account
- Subscribe to the Vinted3 API
- Copy your API key from the RapidAPI dashboard
Test the Application
- Click the "Test" button in the Lazy Builder interface to deploy and run the application.
- Wait for the deployment process to complete.
- Once deployed, you'll receive a server link to access the web application.
Using the App
- Open the provided server link in your web browser.
- You'll see the home page with options to upload an image or take a photo.
- Choose an image file or use your device's camera to capture a photo.
- Click the "Find Similar Items" button to analyze the image and search for similar items on Vinted.
- The results page will display:
- Image analysis results (colors, category, and keywords)
- Similar items found on Vinted, including images, titles, prices, and links to view the items on Vinted
Integrating the App
This web application is standalone and doesn't require additional integration steps. Users can access and use it directly through the provided server link.
By following these steps, you'll have a fully functional Vinted Image Search Assistant that allows users to find similar items on Vinted based on uploaded images.
Here are 5 key business benefits for this Vinted Image Search Assistant template:
Template Benefits
-
Enhanced User Experience: Provides an intuitive interface for users to easily upload images or take photos, analyze them, and find similar items on Vinted, improving engagement and satisfaction.
-
Increased Sales Conversion: By connecting users directly to similar items on Vinted, it streamlines the path to purchase, potentially increasing sales conversions for the platform.
-
AI-Powered Image Analysis: Leverages advanced AI capabilities to analyze uploaded images, extracting key details like colors, categories, and keywords, enabling more accurate and relevant search results.
-
Mobile-Friendly Design: Responsive design with options for both file upload and camera capture caters to mobile users, expanding the potential user base and use cases.
-
Scalable Architecture: Built with Flask and Gunicorn, the application is designed for scalability, allowing it to handle increasing user loads as the service grows in popularity.