Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Try-On Assistant

This project is a Flask-based application that integrates Twilio for messaging and Gradio for virtual try-on functionality. Users can upload images of themselves and garments, and the application will perform a virtual try-on, sending the result back via WhatsApp.

We have utilized the following HuggingFace Spaces:

Prerequisites

Before you begin, ensure you have the following:

  • Python 3.9 or higher
  • Pip (Python package installer)
  • A Twilio account
  • Ngrok account (optional for local testing)

Setup Twilio

Get Twilio Account SSID & Auth Token

  • Redirect to Twilio console, and you will find your Twilio Account SSID & Auth Token.
  • Note the Twilio Account SSID & Auth Token (will be required in further steps).

Setup Ngrok

  • Setup Ngrok: Open Ngrok Downloads
  • Login to Ngrok and note down the Ngrok Auth Token.

Add Ngrok Auth token in terminal

  • Open terminal, run:
    ngrok config add-authtoken TOKEN_VALUE

Installation

  • Clone repository
    git clone https://github.com/ayushr6/Virtual-Clothes-Try-On
    cd Virtual-Clothes-Try-On 
  • Create & Activate environment
    conda create -n env-name python=3.x
    conda activate env-name
  • Install requirements
    pip install -r requirements.txt
  • Create an .env file and add the following Auth, & Tokens
    TWILIO_ACCOUNT_SID=
    TWILIO_AUTH_TOKEN=
    NGROK_URL=

NOTE: to get the NGROK_URL, run the below command:

    ngrok http 8080

Under the Ngork details, copy the URL from in-front of Forwarding and set the NGROK_URL environment variable.

Note: With this command, your local server will be accessible to everyone.

*Everytime you restart your ngrok server, new url will be generated. So, don't forget to update the env and Twilio Sandbox Configuration.

Run the Application

Ngrok server

    ngrok http 8080

Flask Application

    python app.py

How to Use?

  • After setting up all environment variables, and twilio account.
  • Open Twilio chat on whatsapp, and type "Hi" or send an image.
  • Share your image or someone's else.
  • Share a garment image you want to try-on.

That's all; it's that simple!

Virtual Try On Result

About

This project enables a Virtual Try-On experience via WhatsApp using Twilio for media handling and Gradio for AI-powered image processing. Users send images, and the system generates a realistic try-on result, delivered directly to their WhatsApp. Built with Flask for serving the results.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages