This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from allennlp.models.archival import load_archive | |
from allennlp.predictors.predictor import Predictor | |
SERIALIZATION_DIR = './model' | |
archive = load_archive(SERIALIZATION_DIR) | |
predictor = Predictor.from_archive(archive, 'model') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.6 | |
# Update Ubuntu instance | |
RUN apt-get update | |
# Make `/app` directory, copy all local files into that, and set it as working directory | |
RUN mkdir -p /app | |
COPY . /app | |
WORKDIR /app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/hello') | |
def helloIndex(): | |
return 'Hello World from Python Flask!' | |
app.run(host='0.0.0.0', port=8080) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flask |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
# Update Ubuntu instance | |
RUN apt-get update | |
# Sets the environment variable ENV to `development` | |
ENV ENV=development | |
# echos $ENV | |
RUN echo $ENV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import tensorflow_hub as hub | |
import numpy as np | |
from skimage import data | |
module = hub.Module("https://tfhub.dev/google/imagenet/mobilenet_v2_140_224/classification/2") | |
height, width = hub.get_expected_image_size(module) | |
cat = data.chelsea() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import tensorflow_hub as hub | |
import numpy as np | |
from skimage import data | |
module = hub.Module("https://tfhub.dev/google/imagenet/mobilenet_v2_140_224/classification/2") | |
height, width = hub.get_expected_image_size(module) | |
cat = data.chelsea() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import tensorflow_hub as hub | |
import urllib | |
import numpy as np | |
from skimage import data, transform | |
module = hub.Module("https://tfhub.dev/google/imagenet/mobilenet_v2_140_224/classification/2") | |
height, width = hub.get_expected_image_size(module) |