Study Resources
Main Menu
by School
by Textbook
by Literature Title
Study Guides
Infographics
by Subject
Expert Tutors
Contributing
Main Menu
Earn Free Access
Upload Documents
Refer Your Friends
Earn Money
Become a Tutor
Scholarships
For Educators
Log in
Sign up
Find
Study Resources
by School
by Textbook
by Literature Title
Study Guides
Infographics
by Subject
Ask
Expert Tutors
You can ask
!
Earn by
Contributing
Earn Free Access
Learn More >
Upload Documents
Refer Your Friends
Earn Money
Become a Tutor
Scholarships
Learn More >
Are you an educator?
Log in
Sign up
Graphic Era University
COMPUTER S
COMPUTER S CS F222
app.py - from flask import Flask render_template request from sklearn.externals import joblib import pandas as pd import numpy as np app = Flask_name
app.py - from flask import Flask render_template request...
School
Graphic Era University
Course Title
COMPUTER S CS F222
Uploaded By
Sumit_Gupta2104
Pages
1
This
preview
shows page
1
out of
1
page.
from flask import Flask, render_template, request
from sklearn.externals import joblib
import pandas as pd
import numpy as np
app = Flask(__name__)
mul_reg = open("multiple_regression_model.pkl", "rb")
ml_model = joblib.load(mul_reg)
@app.route("/")
def home():
return render_template('home.html')
@app.route("/predict", methods=['GET', 'POST'])
def predict():
print("I was here 1")
if request.method == 'POST':
print(request.form.get('NewYork'))
try:
NewYork = float(request.form['NewYork'])
California = float(request.form['California'])
Florida = float(request.form['Florida'])
RnD_Spend = float(request.form['RnD_Spend'])
You've reached the end of your free preview.
Want to read the whole page?
TERM
Fall '16
TAGS
U.S. state,
Major League Baseball,
National Hockey League,
National Basketball Association
Share this link with a friend:
Copied!