Skip to content

Instantly share code, notes, and snippets.

@tendstofortytwo
Created December 14, 2017 08:44
Show Gist options
  • Save tendstofortytwo/efbb52b06a3a44b810452b5f6b00c4cc to your computer and use it in GitHub Desktop.
Save tendstofortytwo/efbb52b06a3a44b810452b5f6b00c4cc to your computer and use it in GitHub Desktop.
Origami-lib sendTextArrayToTerminal example
import cv2
import origami
# all memory/processor intensive work that is to be done only once (like loading models) goes here
# replace $TOKEN with your app token generated by web app
app = origami.register('$TOKEN')
@origami.crossdomain
@app.listen()
def hello():
origami.sendTextArrayToTerminal(['This is run before ', 'text in Output Component'])
origami.sendTextArray(['output'])
origami.sendTextArrayToTerminal(['This is run after ', 'text in Output Component'])
return 'OK'
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment