Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

convert python code to pseudocode online

from flask import render_template, request, Flask
import joblib

app = Flask(__name__)

model = joblib.load('dicisionTreeModel.pkl')


@app.route('/')
def index():
    return render_template('Main.html')


@app.route('/predict', methods=['GET','POST'])
def predict():
    if (request.method) =='POST':
        age = request.form.get('age')
        sysBloodPress = request.form.get('sysBloodPress')
        diaBloodPress = request.form.get('diaBloodPress')
        bloodGlucoseLevel = request.form.get('bloodGlucoseLevel')
        bodyTemp = request.form.get('bodyTemp')
        heartRate = request.form.get('heartRate')
        data = [age, sysBloodPress, diaBloodPress,
                bloodGlucoseLevel, bodyTemp, heartRate]
        patientPredict = model.predict([data])[0]
        if patientPredict < 1.5:
            return render_template('Main.html', predict=f'Your Risk Level is {patientPredict}, which is Low')
        elif patientPredict < 2.5:
            return render_template('Main.html', predict=f'Your Risk Level is {patientPredict}, which is Medium')
        else:
            return render_template('Main.html', predict=f'Your Risk Level is {patientPredict}, which is High')


if __name__ == "__main__":
    app.run(debug=True)
Comment

Python pseudocode

algorithm add_two_numbers

  input a,b

  sum = a + b

  output sum

end add_two_numbers
Comment

PREVIOUS NEXT
Code Example
Python :: prime palindrome number in python 
Python :: fetch api python 
Python :: .close() python 
Python :: .all() python numpy 
Python :: nested list comprehensions 
Python :: python open application 
Python :: python plot confidence interval 
Python :: unique items in a list python 
Python :: run python in background ubuntu 
Python :: how to comment in python 
Python :: how to get user input in python 
Python :: inline keyboard telegram bot python 
Python :: multiprocessing in python 
Python :: python update function 
Python :: whatsapp bot python code 
Python :: python oops 
Python :: compute confusion matrix using python 
Python :: str in python 
Python :: boolean python example 
Python :: games made with python 
Python :: resampling data python 
Python :: if it is square python 
Python :: hash password python 
Python :: show which columns in dataframe have NA 
Python :: group by data 
Python :: doing math in python 
Python :: python elif 
Python :: text to speech module python 
Python :: python 4 release date 
Python :: run flask in background 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =