Learn to build a web app deployed on Heroku that uses k-means algorithm to pick out a color palette from an uploaded image.

Image credits: Tina Kuper on Unsplash

In this blog post, I will give a detailed explanation on how to set up a color palette generator web app. I will cover the basics of setting up the flask app architecture, building the back-end with the k-means unsupervised learning algorithm in python, and the front end in html, css, and javascript. I will also cover connecting the front end with the back-end using jQuery library and deploying the final app to Heroku.

Here is a quick demo of what we’ll be building.

A simple, one-step system to focus on the things you can control

Source: Photo by Doran Erickson on Unsplash

A tall, extremely attractive Asian woman dressed in a designer-chiffon ball gown stood elegantly against a background of exquisite French decor. She had beautifully chiseled features: high cheek bones, youthful hazel eyes, and full luscious lips framing a content smile — the smile of a girl in bliss.

“Huawei founder’s debutante daughter Annabel Yao chosen to perform the opening waltz at Le Bal des Débutantes in Paris”

“Yao, who is also a Harvard computer science student and ballerina says, ‘As much as I enjoy coding, I have a…

6 critical reasons why you should give it a Go!

GIF by Egon Elbre

In the last few years, Go has seen a massive increase in popularity. Stack Overflow’s 2020 developer survey reports Go moving up to 5th from 10th last year in the list of most loved languages. 67% of the survey respondents like to write code in Go, and another 18% want to try working with it (which puts it in the third place after Python and JavaScript). On top of it all, Go programmers are paid very well. …

A short story on how simple things can sometimes be life-changing

Source: Photo by Hermes Rivera on Unsplash

Rabia observed the hills standing silently in front of her. The slopes were various shades of red, blue, yellow, and green — all jumbled up with a dull muddy brown. On top of the tallest one, an old metal car door jutted out from the rubbish and gleamed in the rising sun. The reflected sunlight made Rabia squint as she looked up to scan the landscape for any new arrivals.

It had rained last night. The moisture in the air combined with the June heat had created the perfect…

Data for Change

Performing sentiment analysis on COVID-19 related tweets to study the correlation between depression and the pandemic.

Representative image. Credits: iStock Photo

The drastic changes in our lifestyles coupled with restrictions, quarantines, and social distancing measures introduced to combat the corona virus outbreak have lead to an alarming rise in mental health issues all over the world. Social media is a powerful indicator of the mental state of people at a given location and time. In order to study the link between the corona virus pandemic and the accelerating pace of depression and anxiety in the general population, I decided to explore tweets related to corona virus.

How is this blog organized?

In this blog post, I will first use keras to train a neural network to…

This blog post explores the process of multi-class image classification in PyTorch using pre-trained convolutional neural networks (CNNs). The post is divided into the following parts:

  1. Importing relevant modules and libraries
  2. Data pre-processing
  3. Training the model
  4. Analyzing the results

Importing relevant modules and libraries

As a first step, the following libraries and modules were imported into the Kaggle notebook.

#### General ####import os
import numpy as np
import tarfile
#### Pytorch ####import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
import torchvision.transforms as tt
from torchvision.datasets.utils import download_url
from torchvision.datasets import ImageFolder
from torch.utils.data import DataLoader
from torch.utils.data import random_split
from torchvision.utils import make_grid
from torchvision.transforms import…


Engineering student at University of Cambridge. Passionate about coding, books, and art.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store