title: how to create a progress bar in python flask for a function call in html
body: <p>I wanted to run a python function when I click submit button on the index.html page, as the function takes a lot of time to run the page is getting timed out.</p>
  <p>here is my code:</p>
  <pre><code>@app.route('/recommend/&lt;search_keyword&gt;')
  def recommend(search_keyword):
      global urls
      urls=[]
      cmp='complete'
      urls=task(search_keyword)
      return render_template('index.html')
  </code></pre>
  <p>My function <code>task()</code> returns a list which is passed to the index.html page to display the list</p>