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