title: Python-Flask: Pass data to machine learning python script and get results back
body: <p>My knowledge in web frameworks are pretty bad. I have a build a machine learning model in python and it takes a set of strings as an input and return results. After searching on the web I came across with <code>Flask</code>. But what I don't know is how to actually create a flask app to actually take a string and allow user to submit and pass that string to my machine learning python script and return results. This is all I have so far</p>
  
  <pre><code>import threading
  import subprocess
  import os
  import sys
  from flask import Flask
  from flask import render_template, abort
  app = Flask(__name__)
  app.debug = True
  
  def run_script():
      theproc = subprocess.Popen([sys.executable, "ML_script.py"])
      theproc.communicate()
  
  
  if __name__ == "__main__":
      app.run()
  </code></pre>
  
  <p>If you can point to an example or provide a solution /skeleton that would be fantastic.</p>