title: Machine Learning: Converting bash script into Python
body: <p>I have followed an online image classification tutorial using Tensorflow to create a variation which classifies an image by jewellery type. It's all up and running. At the minute I have to run this script in the terminal to test the model on a new image:</p>
  
  <pre><code>python -m scripts.label_image \
      --graph=tf_files/retrained_graph.pb  \
      --image=tf_files/jewellery_photos/new_images/1.jpg
  </code></pre>
  
  <p>It works. </p>
  
  <p>Now I want to make an online front-end interface in which users can upload an image, the script will run and the interface will display what type of jewellery item it is.</p>
  
  <p>1) How do I go about connecting this machine learning script to a front-end...</p>
  
  <pre><code>a) Do I store the script in my front-end repository and call it
     when an image has been uploaded by the user? 
  
  b) I need to convert the bash script into python. Do I have to 
     convert the retrained_graph.pb file into something else to be 
     able to import it as a module into a python file?
  </code></pre>