Skip to content

Commit

Permalink
result working
Browse files Browse the repository at this point in the history
  • Loading branch information
AK391 committed Dec 21, 2020
1 parent 439e9b0 commit d5ba126
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions runway_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ def setup(opts):

@runway.command('translate', inputs={'source_imgs': runway.image(description='input image to be translated'),}, outputs={'image': runway.image(description='output image containing the translated result')})
def translate(learn, inputs):
# raise Exception(type(input['source_imgs']))
img_t = T.ToTensor()(inputs['source_imgs'])
img_fast = Image(img_t)
# raise Exception(type(img_fast))
p,img_hr,b = learn.predict(img_fast)
# fastaiImage = Image(img_hr)
return transforms.ToPILImage()(img_hr).convert("RGB")
return np.uint8(np.clip(image2np(img_hr), 0, 1)*255)


if __name__ == '__main__':
runway.run(port=8889)
Expand Down

0 comments on commit d5ba126

Please sign in to comment.