This Flask web application allows users to draw an image based on a given prompt and then compares the similarity between the drawn image and the prompt using the OpenAI CLIP (Contrastive Language-Image Pre-training) model.
- Paint Page: Users can draw an image based on a provided prompt.
- Prompt Generator: Users can receive a random prompt to inspire their drawing.
- Gallery: Saved image gallery
- Similarity Comparison: The drawn image is compared with the provided prompt using CLIP, and the similarity percentage is displayed.
-
Clone the repository:
git clone https://github.com/Bala-Vignesh-Reddy/Promraw.git
-
Navigate to the project directory:
cd Promraw
-
Install the required dependencies using pip:
pip install -r requirements.txt
-
Run the Flask application:
python main.py
-
Access the web application in your browser at
http://localhost:5000
.
- Draw an image based on the provided prompt on the paint page.
- Click on the "Generate Prompt" button to receive a random prompt if desired.
- Click on the "Submit" button to compare your drawing with the provided prompt.
- View the similarity percentage and the original prompt.
- Flask: Web framework for building the application.
- PyTorch: Deep learning library used for CLIP model integration.
- Transformers: Library for natural language understanding (NLU) and natural language generation (NLG) tasks, including CLIP.
- Pillow: Image processing library used for handling images.
This project is licensed under the MIT License.