Skip to content

Commit e7f89d3

Browse files
committed
message
1 parent 7272fbb commit e7f89d3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/pages/home/home.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,19 @@ export class HomePage {
8787
loader.dismiss();
8888
this.presentToast("Image uploaded successfully");
8989
var find_monument = false;
90+
var model = 0;
9091
for (var i=0; i<json.images[0].classifiers[0].classes.length; i++) {
91-
if (json.images[0].classifiers[0].classes[i].class == 'building'|| json.images[0].classifiers[0].classes[i].class == 'arch' || json.images[0].classifiers[0].classes[i].class == 'tower'|| json.images[0].classifiers[0].classes[i].class == 'bridge')
92+
if (json.images[0].classifiers[0].classes[i].class == 'pontalexandre3.zip' || json.images[0].classifiers[0].classes[i].class == 'Arc_Carroussel') {
9293
find_monument = true;
94+
model = i;
95+
}
9396
}
9497
if (find_monument) {
95-
this.showAlert(json.images[0].classifiers[1].classes[0].class+" with score of : "+ json.images[0].classifiers[0].classes[0].score);
98+
this.showAlert(json.images[0].classifiers[model].classes[0].class+" with score of : "+ json.images[0].classifiers[0].classes[0].score);
9699
} else {
97100
this.showAlert("Watson hasn't found any monument on this picture...");
98101
}
99-
//this.showAlert(json.images[0].classifiers[0].classes[0].class+" with score of : "+ json.images[0].classifiers[0].classes[0].score); //display the higher result
102+
//this.showAlert(json.images[0].classifiers[1].classes[0].class+" with score of : "+ json.images[0].classifiers[0].classes[0].score);
100103
}, (err) => {
101104
console.log(err);
102105
loader.dismiss();

0 commit comments

Comments
 (0)