Skip to content

Instantly share code, notes, and snippets.

@dpotikan
dpotikan / app.py
Created July 27, 2022 03:16
VGG16 Image Classification (Flask Web Application) - Thanks to https://youtu.be/0nr6TPKlrN0
from flask import Flask, render_template, request
from tensorflow.keras.preprocessing.image import load_img
from tensorflow.keras.preprocessing.image import img_to_array
from tensorflow.keras.applications.vgg16 import preprocess_input, decode_predictions
from tensorflow.keras.applications.vgg16 import VGG16
# from tensorflow.keras.applications.resnet50 import ResNet50
app = Flask(__name__)
model = VGG16()