Classifier update fix

This commit is contained in:
Christoph Hagen 2020-09-09 18:57:56 +02:00
parent 0efce9be96
commit f1a36d5cbe
2 changed files with 3 additions and 3 deletions

View File

@ -495,8 +495,8 @@ class TableView: UITableViewController {
updateNavigationItemTitleView()
}
private func loadClassifier() {
guard classifier == nil else {
private func loadClassifier(reload: Bool = false) {
guard classifier == nil || reload else {
return
}
guard let model = app.storage.recognitionModel else {
@ -691,7 +691,7 @@ class TableView: UITableViewController {
self.log("Failed to download classifier")
return
}
loadClassifier()
loadClassifier(reload: true)
self.log("Classifier was downloaded.")
guard let image = accessory!.currentImage else {
classifyDummyImage()