text: # -*- coding: utf-8 -*-
  """
  Created on Wed Jun  3 04:41:11 2020
  
  @author: Milad
  """
  
  
  
  import numpy as np
  import matplotlib.pyplot as plt
  import pandas as pd
  import joblib
  
  # Importing the dataset
  dataset = pd.read_csv('C:/Users/Milad/Desktop/blood_pressure_dataset.csv')
  X = dataset.iloc[:, 1:-1].values
  y = dataset.iloc[:, -1].values
  advices =dataset.iloc[:, 0].values
  # Training the Linear Regression model on the whole dataset
  from sklearn.linear_model import LinearRegression
  lin_reg = LinearRegression()
  lin_reg.fit(X, y)
  
  
  
  # Predicting a new result with Polynomial Regression
  predict=int(lin_reg.predict([[120,80]]))
  print (predict)
  pressure_advices = advices[predict-1]
  print(pressure_advices)
  #save model 
  filename1 = 'pressure_lin_model.sav'
  joblib.dump(lin_reg, filename1)
  
  
  #save data
  data = np.asarray(advices)
  np.savetxt('pressure_data.csv', data, delimiter=',',fmt='%s')