Skip to content

Instantly share code, notes, and snippets.

@zcaceres
Created November 18, 2018 21:31
Show Gist options
  • Save zcaceres/f95603e37e133f945719682d0e4cc649 to your computer and use it in GitHub Desktop.
Save zcaceres/f95603e37e133f945719682d0e4cc649 to your computer and use it in GitHub Desktop.

Revisions

  1. zcaceres created this gist Nov 18, 2018.
    9 changes: 9 additions & 0 deletions node-python-fastai-4.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    from model_fastai import FastaiImageClassifier

    class PythonServer(object):
    def listen(self):
    print(f'Python Server started listening on {PORT} ...')

    def predict_from_img(self, img_path):
    model = FastaiImageClassifier()
    return model.predict(img_path)