text: import csv
  from flask import Flask, render_template,request,redirect,url_for
  import diseaseprediction
  #import mySQLdb
  
  app = Flask(__name__)
  #conn = MySQLdb.connect(host='localhost',user='root',password='',db='disease_database')
  
  with open('templates/Testing.csv', newline='') as f:
          reader = csv.reader(f)
          symptoms = next(reader)
          symptoms = symptoms[:len(symptoms)-1]
  @app.route('/', methods=['GET'])
  def dropdown():
          return render_template('includes/default.html', symptoms=symptoms)
  
  @app.route('/disease_predict', methods=['POST'])
  def disease_predict():
      selected_symptoms = []
      if(request.form['Symptom1']!="") and (request.form['Symptom1'] not in selected_symptoms):
          selected_symptoms.append(request.form['Symptom1'])
      if(request.form['Symptom2']!="") and (request.form['Symptom2'] not in selected_symptoms):
          selected_symptoms.append(request.form['Symptom2'])
      if(request.form['Symptom3']!="") and (request.form['Symptom3'] not in selected_symptoms):
          selected_symptoms.append(request.form['Symptom3'])
      if(request.form['Symptom4']!="") and (request.form['Symptom4'] not in selected_symptoms):
          selected_symptoms.append(request.form['Symptom4'])
      if(request.form['Symptom5']!="") and (request.form['Symptom5'] not in selected_symptoms):
          selected_symptoms.append(request.form['Symptom5'])
  
      # disease_list = []
      # for i in range(7):
      #     disease = diseaseprediction.dosomething(selected_symptoms)
      #     disease_list.append(disease)
      # return render_template('disease_predict.html',disease_list=disease_list)
      disease = diseaseprediction.dosomething(selected_symptoms)
      return render_template('disease_predict.html',disease=disease,symptoms=symptoms)
  
  # @app.route('/default')
  # def default():
  #         return render_template('includes/default.html')
   
  @app.route('/find_doctor', methods=['POST'])
  def get_location():
      location = request.form['doctor']
      return render_template('find_doctor.html',location=location,symptoms=symptoms)
  
  @app.route('/drug', methods=['POST'])
  def drugs():
      medicine = request.form['medicine']
      return render_template('homepage.html',medicine=medicine,symptoms=symptoms)
  
  if __name__ == '__main__':
      app.run(debug=True)