Read the full article here: https://analyticsarora.com/how-to-make-a-flask-web-app-for-keras-model/
So, you have built some kind of machine learning model in Keras. Now, you want to add a frontend interface so people can actually interact with your model in an approachable way. Look no further. In this tutorial, I will cover how to package your Keras model into a powerful web application using Flask.
This is the second article in a series talking about how I made and deployed a neural network to rate songs like the popular music reviewer Anthony Fantano. You can read about the process of researching and developing the neural network in the first article. The final article covers the issues I encountered deploying a Flask Web Application to Heroku.
Click here to see all my code.
- Cloning the Starter Code
- Mocking Up the Design
- Writing the HTML and CSS
- Creating the Model Operation Functions
- Saving the Best Model
- Initializing the Tensorflow Session
- Data Preprocessing Function
- Prediction Function
- Taking in User Input
- Accepting File Drag Events
- Sending Files through a Post Request
- Saving Files to Temporary Directory
- Showing and Hiding Elements
- Submit Function
- Clear Function
- Demo and Conclusion