How to implement a CoreML model into an iOS app properly?

I am working on a lung cancer scanning app in for iOS with a CoreML model and when I test my app on a physical device, the model results in the same prediction 100% of the time. I even changed the names around and still resulted in the same case. I have listed my labels in cases and when its just stuck on the same case (case 1)

My code is below: https://github.com/ShivenKhurana1/Detect-to-Protect-App/blob/main/DetectToProtect/SecondView.swift

I couldn't add the code as it was too long so I hope github link is fine!

I don't see issues in your code with a quick glance but it is quite a big code base.

My recommendation would be to make a small test project that just loads the model and makes a prediction. We can then tell whether the issue is in the model or in the usage of CoreML API (or somewhere else.)

How to implement a CoreML model into an iOS app properly?
 
 
Q