Skip to content

Instantly share code, notes, and snippets.

View cvalenzuela's full-sized avatar
🦌

Cristóbal Valenzuela cvalenzuela

🦌
View GitHub Profile
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
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'],
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):