This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import pandas as pd | |
| # these are the top 5 rated high schools in Chicago | |
| top5 = ['Walter Payton College Prep', | |
| 'northside college preparatory high school', | |
| 'Jones College Prep', | |
| 'Whitney Young High', | |
| 'Lane Tech High School', | |
| ] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from geopy.geocoders import Nominatim | |
| # create a Nominatim object | |
| geolocator = Nominatim(user_agent="your_app_name") | |
| location = geolocator.geocode("121 N LaSalle St, Chicago") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from flask import Flask, render_template, request | |
| import numpy as np | |
| from sklearn.linear_model import LinearRegression | |
| import pickle | |
| with open('model/my_model.pkl', 'rb') as file: | |
| model = pickle.load(file) | |
| app = Flask(__name__) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>My Model</title> | |
| </head> | |
| <body> | |
| <form method=post enctype=multipart/form-data> | |
| Beds: <input type="number" name="beds" min="1" max="10"><br> | |
| Baths: <input type=number name="baths" min="1" max="10"><br> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>My Model</title> | |
| </head> | |
| <body> | |
| My prediction: {{ pred }} | |
| </body> | |
| </html> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @app.route('/') | |
| def index(): | |
| pred = model.predict(np.array([1,2,3])) | |
| return render_template('index.html', pred=str(pred)) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>My Model</title> | |
| </head> | |
| <body> | |
| My prediction: | |
| </body> | |
| </html> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from flask import Flask, render_template | |
| import numpy as np | |
| from sklearn.linear_model import LinearRegression | |
| import pickle | |
| with open('model/my_model.pkl', 'rb') as file: | |
| model = pickle.load(file) | |
| app = Flask(__name__) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from flask import Flask | |
| import numpy as np | |
| from sklearn.linear_model import LinearRegression | |
| import pickle | |
| with open('model/my_model.pkl', 'rb') as file: | |
| model = pickle.load(file) | |
| app = Flask(__name__) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from flask import Flask | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def hello_world(): | |
| return 'Hello, World!' |