Example
Last updated
import cortex
api_spec = {
"name": "text-generator",
"kind": "RealtimeAPI",
"handler": {
"type": "python",
"path": "handler.py"
}
}
cx = cortex.client("cortex")
cx.deploy(api_spec, project_dir=".")# api.yaml
- name: text-generator
kind: RealtimeAPI
handler:
type: python
path: handler.pycortex deploy api.yaml