Open arijitdas123student opened 1 year ago
Hi, it seems Apple changed the way models are loaded in Playgrounds apps some time between when I created ASLearn and now.
Previously, you'd add in a compiled mlmodelc
and load that in, but now, you need to add the autogenerated Model class (you can get this by adding your model to a regular iOS app, building it, and checking the ~DerivedData directory.
You then need to just add the mlmodel
file and the generated class in. You may need to modify the generated class slightly so it's like this:
class var urlOfModelInThisBundle : URL {
let resPath = Bundle(for: self).url(forResource: "YourModelName", withExtension: "mlmodel")!
return try! MLModel.compileModel(at: resPath)
}
Hey, great work indeed! I was trying to use a different ML model (image classification) that I made using CreateML however I do face some issues while running it with your code.
Can you please take a look?