title: how to get response message when user enters the text using flask?
body: <p>I created a chatbot using for loop.In browser it is not giving response when user enters the text.</p>
  
  <p>I tried like below:</p>
  
  <p>app.py:</p>
  
  <pre><code>import flask
  from flask import Flask, render_template, request
  from werkzeug.wrappers import Request, Response
  import pandas as pd
  import re
  #####***** Reading the data
  data=pd.read_excel("path",sheet_name='Sheet2')
  #######**** Converting columns to a lists
  userList=data["User"].tolist()
  cbList=data["CB"].tolist()
  app = Flask(__name__)
  ##########***** asking user to enter their questions and giving responses 
  bot_response=[]
  for i in range(0,len(userList)):
          user=input("User:")
          if user=='':
              print("Bye")
              break
          userReg=re.sub('[^A-Za-z0-9]'," ",user.lower())
          userRegSplit=(userReg.split())
          ud=str(userList[i]).lower()
          ud=re.sub('[^A-Za-z0-9]'," ",ud)
          newList=ud.split()
          commonWords=[x for x in newList if x in userRegSplit]
          if len(commonWords)==len(newList):
              bot_response.append(cbList[i])
              print(bot_response)
  @app.route('/')
  def CBApp():
      return render_template('CBApp.html')
  @app.route("/get")
  def get_bot_response():
      userText = request.args.get('msg')
      return str(bot_response.get_response(userText))
  if __name__=='__main__':
      from werkzeug.serving import run_simple
      app.debug=True
      run_simple('localhost',port,app)
  </code></pre>
  
  <p>html template will look like below:</p>
  
  <pre><code> [1]: https://i.stack.imgur.com/rY4tW.png
  </code></pre>
  
  <p>suggest me where am gone wrong?</p>