We will use the Flask framework to build a simple application to detect the car's damage.
We are not going to go deeper into Flask basics here. Instead, we are simply adding our model with an existing file upload example from Flask.
The file's structure is shown in the following screenshot:
Here is a list of the contents in app.py:
from classify import prediction
import tensorflow as tf
from flask import Flask, render_template, request, redirect, url_for, send_from_directory,flash
from werkzeug import secure_filename
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = 'uploads/'
app.config['ALLOWED_EXTENSIONS'] = set(['jpg', 'jpeg'])