title: Running TensorFlow script after new image with dogwatch
body: <p>I have a Raspberry Pi 4 with the Coral Accelerator.</p>
  <p>Here's what I'm trying to do:</p>
  <ol>
  <li><p>I have a directory on the Pi where I can automatically upload photos from my phone</p>
  </li>
  <li><p>I have watchdog working that detects when a new photo is added (uploaded)</p>
  </li>
  <li><p>[My problem area I need some help or guidance]: In the <code>elif</code> for the new file created (image uploaded) I want to run the python script and commands to run the image processing to detect what's in the picture (coral accelerator)</p>
  </li>
  </ol>
  <p>The trouble area is surrounded by a row of asterisks.</p>
  <pre><code>import time
  from watchdog.observers import Observer
  from watchdog.events import FileSystemEventHandler
  
  class Watcher:
      DIRECTORY_TO_WATCH = &quot;/path/to/img/directory&quot;
  
      def __init__(self):
          self.observer = Observer()
  
      def run(self):
          event_handler = Handler()
          self.observer.schedule(event_handler, self.DIRECTORY_TO_WATCH, recursive=True)
          self.observer.start()
          try:
              while True:
                  time.sleep(5)
          except:
              self.observer.stop()
              print(&quot;Error&quot;)
  
          self.observer.join()
  
  
  class Handler(FileSystemEventHandler):
  
      @staticmethod
      def on_any_event(event):
          if event.is_directory:
              return None
  
          elif event.event_type == 'created':
              # Take any action here when a file is first created.
              print (event.src_path)
              ******************************
              ******************************
              python3 classify_image.py \
              --model models/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
              --labels models/inat_bird_labels.txt \
              --input event.src_path
              ******************************
              ******************************
  
          # elif event.event_type == 'modified':
              # Taken any action here when a file is modified.
              # print(&quot;Received modified event - %s.&quot; % event.src_path)
  
          elif event.event_type == 'deleted':
              # Taken any action here when a file is deleted.
              print(&quot;Received deleted event - %s.&quot; % event.src_path)
  
  
  if __name__ == '__main__':
      w = Watcher()
      w.run()
  </code></pre>
  <p>Thanks in advance.</p>