This repository contains a simple web application that applies a Bokeh effect to an uploaded image. The application is built using Flask, a Python web framework, and utilizes the Pillow library (PIL) for image processing.
-
index.py: The main Python script containing the Flask application. It handles the web routes, image processing, and file uploads.
-
templates/index.html: HTML template for the web interface. It includes a form for uploading an image file.
-
upload: Directory to store uploaded images. It contains both the input image (
input.jpg
) and the output image with the Bokeh effect applied (output.jpg
).
-
Clone the repository:
git clone https://github.com/khush1709/Bokeh-effect.git
-
Install the required dependencies. You can use the following command in the terminal:
pip install Flask Pillow
-
Navigate to the project directory.
cd Bokeh-effect
-
Run the Flask application.
python index.py
-
Open your web browser and go to http://127.0.0.1:5000/ to access the Bokeh Effect Web App.
-
The main page displays a form with a file input and a button.
-
Choose an image file using the file input.
-
Click the "Upload and Apply Bokeh Effect" button to process the image.
-
The processed image with the Bokeh effect applied will be available for download.
-
The uploaded images are temporarily stored in the
uploads
directory. -
The Bokeh effect is applied using the GaussianBlur filter from the Pillow library.
-
The web interface is styled with simple CSS for a clean and responsive design.
Feel free to explore and modify the code to enhance or customize the Bokeh effect web application according to your preferences.