andreasjansson / cog-markdown-example

Simple example of a Cog model that produces Markdown output

  • Public
  • 23 runs
  • GitHub
  • License

Readme

This is a simple example to demonstrate how to output markdown from Cog.

If Cog returns a pathlib.Path pointing to a generated markdown file with extension .md it will be rendered to HTML on Replicate. This is demonstrated in the predict() function in predict.py.

We use GitHub-flavored Markdown to do the rendering, but there may be some features missing for security reasons.