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
entrypoint: python runway_model.py | |
python: 3.6 | |
cuda: 9.0 | |
spec: | |
gpu: True | |
cpu: True | |
build_steps: | |
- pip install torch==1.1.0 runway-python numpy==1.16.4 |
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 runway | |
import torch | |
from transformers import BertTokenizer | |
from transformers import BertForNextSentencePrediction | |
from runway.data_types import array, text, number, boolean | |
# Setup block copy-pasted from Cris's tutorial | |
@runway.setup(options={"checkpoint": runway.category(description="Pretrained checkpoints to use.", | |
choices=['celebAHQ-512', 'celebAHQ-256', 'celeba'], |
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 runway | |
from runway.data_types import number, text, image | |
import numpy as np | |
from scipy import ndimage | |
import time | |
@runway.command(name='convert', | |
inputs={ 'image': image }, | |
outputs={ 'image': image }) | |
def generate(model, inputs): |
OlderNewer