Examples#
Cog's example models now live in the main Cog repository under
examples/.
If you want a working project to copy from, start with one of these:
hello-world: minimal string input/output examplehello-image: returns a static imagehello-context: shows how to read prediction contexthello-concurrency: demonstrates theconcurrencysetting incog.yamlhello-train: defines a training interfacehello-replicate: usescog.Secretinputs and calls the Replicate APIblur: simple image-to-image transformationresnet: GPU image classification with ResNet50streaming-text: streaming text generation with server-sent eventsz-image-turbo: a generative image model examplenotebook: runs a Jupyter notebook with Cogcanary: small streaming output example used for validationmanaged-weights: managed weights pipeline fixture
There is also an experimental example:
experimental/resnet-managed-weights: ResNet50 packaged with managed weights
For a quick summary of every example in the tree, see
examples/README.md.