Skip to content
Daniel Shiffman edited this page Aug 28, 2024 · 1 revision

ml5.js 1.0 Resources

<script src="https://unpkg.com/ml5@1/dist/ml5.min.js"></script>

ml5.js prior to 1.0 Release

  • When would I need to use an old version of ml5.js?
    • If you would like to use a particular model, such as FeatureExtractor or StyleTransfer, which is currently only supported in older versions of ml5.js.
    • If you encounter a code example or tutorial that uses an old version of ml5.js.
    • More specifically, some sketches written for older versions of ml5.js may use ml5@latest in the <script> tag. This tag automatically loads the latest version of ml5.js, which worked fine before ml5.js 1.0 was released, but now causes errors because these sketches are not compatible with ml5.js 1.0.
  • In these instances, update the <script> tag in the index.html file of your project to the following (or specify the exact version you need):
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js"></script>