Skip to content

Instantly share code, notes, and snippets.

@anupamchugh
Last active November 15, 2019 17:54
Show Gist options
  • Save anupamchugh/6dbd7f05bb9eac618b4e4c91f24024ac to your computer and use it in GitHub Desktop.
Save anupamchugh/6dbd7f05bb9eac618b4e4c91f24024ac to your computer and use it in GitHub Desktop.
import SwiftUI
import Combine
import CoreML
struct ContentView: View {
@ObservedObject var topRecommendations = Recommender()
var body: some View {
NavigationView {
List(topRecommendations.movies) { movie in
VStack (alignment: .leading) {
Text(movie.name)
Text("\(movie.score)")
.font(.system(size: 14))
.foregroundColor(Color.gray)
}
}.navigationBarTitle("CoreMLRecommender", displayMode: .inline)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment