Welcome to our fashion image generator and search engine project. This project combines Upstash Vector and Dall-E, index and search images from more than 10 online retail stores, such as Nike, Calvin Klein, and Prada.
Note: The demo supports 20 requests per day.
Note
This project is a Community Project.
The project is maintained and supported by the community. Upstash may contribute but does not officially support or assume responsibility for it.
👗 Fashion Product Generation: You can enter a specific item like 'thick woolen sweater in burgundy for a cozy winter' and the system will generate a realistic image of the described product.
🔍 Product Similarity Search: We leverage the search capabilities of Upstash Vector to index the images.
👀 Query Expansion: The system also supports query expansion. You can revise the generated image and the system will generate a new image based on the revised description.
- Backend: FastAPI (Fly.io)
- Frontend: React.js (Vercel)
- Data Storage: Upstash Vector
- AI: OpenAI DALL-E and ChatGPT
- Model: OpenAI CLIP
- Crawler: Selenium
Upload an image of a product you like or enter a product description and the system employs DALL-E model to generate high-quality images of the described product. When a query is received with the generated image, the system efficiently retrieves the relevant images from the index. Along with the product links are provided to guide users directly to the online retail shops where the items can be purchased.
-
Clone or download this repository to a directory on your local machine.
-
Navigate into the directory using your terminal.
-
Get your Upstash Vector url and token from here.
-
Get your OpenAI API key from here.
-
Install the Fly CLI by running
curl -L https://fly.io/install.sh | sh
. -
Run
flyctl auth login
to authenticate the CLI. -
Run
flyctl launch
to create and deploy the application. -
Set your environment variables using
flyctl secrets set KEY=VALUE
. -
Run
flyctl deploy
to deploy the application with the updated environment variables. -
Send a POST request to
https://app_name.fly.dev/image
with the following JSON body. Revise list and with model are optional.
{
"gender": "woman",
"product_description": "Blue dress",
"revise_list": ["make the dress longer", "make the dress black"],
"with_model": false
}
- The response will contain the generated image and the product links. Which you can post to
https://app_name.fly.dev/query
to query the indexed images.
{
"image_url": "https://oaidalleapiprodscus.blob.core.windows.net/dalle/0d3e3e3e-3e3e-3e3e-3e3e-3e3e3e3e3e3e",
}
-
Price Field: This will allow users to see the price of the product in the search results.
-
Filtering: This will allow users to filter the search results based on the gender, brand, and other attributes.
-
More Stores: This will allow users to search for products from a wider range of stores.
-
Crawler Automation: This will allow us to update the index more frequently.
We welcome contributions from the community. If you would like to contribute, please open an issue or a pull request.
Sharing the project on social media and with your friends is also a great way to contribute.