Deploy Machine Learning Model using Flask

Krish Naik · 298K views · 2019 · 13:20

Open on YouTube

Machine learning & deep learningPython, Ruby & scripting languagesWeb developmenttutorial

Why Stack Overflow recommends it

Stack Overflow users link it when someone asks how to connect a Python ML model to a web front end and Flask is the suggested route.

Recommended by 1 people across 1 different months, 2019 to 2020.

What it is

A 13-minute tutorial by Krish Naik showing how to wrap a trained machine learning model in a Flask web app so it can serve predictions. The accompanying GitHub repo holds the code used in the walkthrough.

What people said

Recommends Sumanth Somshekhar · 2020-03 · Stack Overflow · on “Can we pass a JavaScript variable to a Python file?”

Did you try using Flask micro web-framework ? It is the easiest way of integrating ML projects with web. Check these videos if it helps Deploying deep learning using flask for an image recogntion project [LINK] Deploy ML model using flask [this video]

Cites A2N15 · 2019-11 · Stack Overflow · on “Perform predictions on a data in csv file using Flask and python”

Hello world, New in Python and Flask API, I am trying to import a csv file and export another csv file with prediction The INPUT csv file looks like this experience test_score interview five 10 110 nan 5 140 six 15 90 ..... The Python script looks like this (app.py) from flask import Flask, make_response, request import io import csv app = Flask(__name__) def transform(text_file_contents): return text_file_contents.replace("=", ",") @app.route('/') def form(): return """ <html> <body> <h1>Let's TRY to Predict..</h1> </br> </br> <p> Insert your CSV file and then download the Result <form action="/transform" method="post" enctype="multipart/form-data"> <input type="file" name="data_file" class

Cites Nishigandha Sharma · 2020-05 · Stack Overflow · on “How do I pre-process few of my independent and the dependent variables while building an ML model in Flask?”

It is a regression problem at hand to predict the Customer Lifetime value given the demographic data. I have a total of 14 X variables which are a mix of categorical & numerical data. X = ['Coverage', 'Education', 'EmploymentStatus', 'Income', 'Marital Status', 'Months Since Last Claim', 'Months Since Policy Inception', 'Number of Open Complaints', 'Number of Policies', 'Renew Offer Type', 'Vehicle Class', 'Vehicle Size', 'Monthly Premium Auto_boxcox', 'Total Claim Amount_boxcox'] y = ['Customer Lifetime Value_boxcox'] The idea is to build a form where one can enter the X variables in the form and the Flask model will predict the Customer Lifetime Value. Currently as you can see the data for