text: 
  import pickle
  from flask import Flask, request , jsonify, render_template
  
  app=Flask(__name__)
  
  DecisionTree = pickle.load(open('DecisionTree.pkl','rb'))
  RandomForest = pickle.load(open('RandomForest.pkl','rb'))
  NaiveBayes = pickle.load(open('NaiveBayes.pkl','rb'))
  
  l1=['back_pain','constipation','abdominal_pain','diarrhoea','mild_fever','yellow_urine',
  'yellowing_of_eyes','acute_liver_failure','fluid_overload','swelling_of_stomach',
  'swelled_lymph_nodes','malaise','blurred_and_distorted_vision','phlegm','throat_irritation',
  'redness_of_eyes','sinus_pressure','runny_nose','congestion','chest_pain','weakness_in_limbs',
  'fast_heart_rate','pain_during_bowel_movements','pain_in_anal_region','bloody_stool',
  'irritation_in_anus','neck_pain','dizziness','cramps','bruising','obesity','swollen_legs',
  'swollen_blood_vessels','puffy_face_and_eyes','enlarged_thyroid','brittle_nails',
  'swollen_extremeties','excessive_hunger','extra_marital_contacts','drying_and_tingling_lips',
  'slurred_speech','knee_pain','hip_joint_pain','muscle_weakness','stiff_neck','swelling_joints',
  'movement_stiffness','spinning_movements','loss_of_balance','unsteadiness',
  'weakness_of_one_body_side','loss_of_smell','bladder_discomfort','foul_smell_of urine',
  'continuous_feel_of_urine','passage_of_gases','internal_itching','toxic_look_(typhos)',
  'depression','irritability','muscle_pain','altered_sensorium','red_spots_over_body','belly_pain',
  'abnormal_menstruation','dischromic _patches','watering_from_eyes','increased_appetite','polyuria','family_history','mucoid_sputum',
  'rusty_sputum','lack_of_concentration','visual_disturbances','receiving_blood_transfusion',
  'receiving_unsterile_injections','coma','stomach_bleeding','distention_of_abdomen',
  'history_of_alcohol_consumption','fluid_overload','blood_in_sputum','prominent_veins_on_calf',
  'palpitations','painful_walking','pus_filled_pimples','blackheads','scurring','skin_peeling',
  'silver_like_dusting','small_dents_in_nails','inflammatory_nails','blister','red_sore_around_nose',
  'yellow_crust_ooze']
  
  disease=['Fungal infection','Allergy','GERD','Chronic cholestasis','Drug Reaction',
  'Peptic ulcer diseae','AIDS','Diabetes','Gastroenteritis','Bronchial Asthma','Hypertension',
  ' Migraine','Cervical spondylosis',
  'Paralysis (brain hemorrhage)','Jaundice','Malaria','Chicken pox','Dengue','Typhoid','hepatitis A',
  'Hepatitis B','Hepatitis C','Hepatitis D','Hepatitis E','Alcoholic hepatitis','Tuberculosis',
  'Common Cold','Pneumonia','Dimorphic hemmorhoids(piles)',
  'Heartattack','Varicoseveins','Hypothyroidism','Hyperthyroidism','Hypoglycemia','Osteoarthristis',
  'Arthritis','(vertigo) Paroymsal  Positional Vertigo','Acne','Urinary tract infection','Psoriasis',
  'Impetigo']
  
  
  l2=[]
  for x in range(0,len(l1)):
      l2.append(0)
  
  global psymptons,inputtest
  
  
  @app.route('/')
  def home():
      return render_template('index.html')
      
  # @app.route('/',methods=['POST'])
  # def predict():
  #     global psymptons
      
  #     psymptoms = list(request.form.values())
      
  #     print(psymptoms)
          
  #     for k in range(0,len(l1)):
  #         for z in psymptoms:
  #             if(z==l1[k]):
  #                 l2[k]=1
  
  #     inputtest = [l2]
  #     predict = DecisionTree.predict(inputtest)
  #     predicted=predict[0]
  #     for a in range(0,len(disease)):
  #         if(predicted == a):
  #             output=disease[a]
  
  
      
  @app.route('/predict',methods=['POST'])
  def predict():
      global psymptons,inputtest
      
      psymptoms = list(request.form.values())
      
      print(psymptoms)
          
      for k in range(0,len(l1)):
          for z in psymptoms:
              if(z==l1[k]):
                  l2[k]=1
  
      inputtest = [l2]
      return render_template('predict.html')
      # predict = DecisionTree.predict(inputtest)
      # predicted=predict[0]
      # for a in range(0,len(disease)):
      #     if(predicted == a):
      #         output=disease[a]
  
  
  @app.route('/decisiontree')
  def decisiontree():
      global inputtest
      predict = DecisionTree.predict(inputtest)
      predicted=predict[0]
      for a in range(0,len(disease)):
          if(predicted == a):
              output=disease[a]
  
      return render_template('DecisionTree.html', prediction_text='the dieseas must be : ${}'.format(output))
      
      # final_features= [np.array(int_features)]
      #prediction = DecisionTree.predict(final_features)
      #print(prediction)
      #output=round(prediction[0],2)
      
      
      # return render_template('index.html', prediction_text='the dieseas must be : ${}'.format(output))
  
  @app.route('/randomforest')
  def randomforest():
      global inputtest
      predict = RandomForest.predict(inputtest)
      predicted=predict[0]
      for a in range(0,len(disease)):
          if(predicted == a):
              output=disease[a]
  
      return render_template('DecisionTree.html', prediction_text='the dieseas must be : ${}'.format(output))
  
  @app.route('/naivebayes')
  def naivebayes():
      global inputtest
      predict = NaiveBayes.predict(inputtest)
      predicted=predict[0]
      for a in range(0,len(disease)):
          if(predicted == a):
              output=disease[a]
  
      return render_template('NaiveBayes.html', prediction_text='the dieseas must be : ${}'.format(output))
  
  
  if __name__=="__main__":
      app.run()
      
  