且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Swift Playground 中使用 .mlmodel?

更新时间:2023-02-02 08:03:31

Playground doesn't recognize the .mlmodel file by default, so we need an iOS Project to help us find the compiled mlmodelc folder, and copy the mlmodelc folder to playground's resource folder, and the auto generated helper class to playground's source folder and change it to public. Then it works!

Try this project: https://github.com/DocRace/AnimalClassifier-Swift-Playground