Skip to content

Instantly share code, notes, and snippets.

@tabsciy
Created September 22, 2022 04:51
Show Gist options
  • Save tabsciy/c843ef32b1c87f998e0eff967853e17b to your computer and use it in GitHub Desktop.
Save tabsciy/c843ef32b1c87f998e0eff967853e17b to your computer and use it in GitHub Desktop.
hello world example with loaded state
from Algorithmia import ADK
import Algorithmia
client = Algorithmia.client()
def apply(input, modelData):
return "hello {} {}".format(str(input), str(modelData['payload']))
def load(modelData):
modelData['payload'] = "Loading has been completed."
return modelData
algorithm = ADK(apply, load)
algorithm.init("Algorithmia")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment