Giter Site home page Giter Site logo

rgen's Introduction

RGen: README Generator for Cog and Replicate

RGen is a utility package designed to simplify the process of creating README files for your machine learning models packaged with Cog and published on Replicate.

Installation

You can install RGen directly from its GitHub repository using pip:

pip install git+https://github.com/joehoover/rgen.git

Quick start

To use the default Cog and Replicate README templates, you can just:

  1. Build a README yaml from the default Cog and Replicate README templates.
rgen extract
  1. Fill out the fields in readme.yaml.

  2. Run rgen generate

Usage

RGen provides a command-line interface to generate README files. It follows a two-step process:

  1. Extract: This operation reads the provided README templates, identifies the fields that need to be filled, and writes these fields into a readme.yaml file. If readme.yaml already exists, it will not be overwritten.
rgen extract --template1 path_or_url_to_readme_template1 --template2 path_or_url_to_readme_template2

By default, rgen uses cog_readme_template.md and replicate_readme_template.md for template1 and template2 respectively.

  1. Generate. This operation reads the readme.yaml file and populates the fields in the README templates. The populated README files are then written to the disk.
rgen generate --template1 path_or_url_to_readme_template1 --template2 path_or_url_to_readme_template2

About readme.yaml

readme.yaml is a YAML file that holds the values for the fields that need to be filled in the README templates. After running rgen extract, you should edit readme.yaml to provide appropriate values for the fields.

For multi-line values in YAML, you can use the | character for literal block scalars or the > character for folded block scalars. For example:

multi_line: |
    line 1
    line 2
    line 3

or

folded_multi_line: >
    line 1
    line 2
    line 3

rgen's People

Contributors

joehoover avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.