normalizing arrays before output
Browse files
app.py
CHANGED
@@ -178,6 +178,10 @@ def predict_and_analyze(model_name, num_channels, dim, image):
|
|
178 |
output = 'Planet predicted with %f percent confidence' % (100*output[1])
|
179 |
else:
|
180 |
output = 'No planet predicted with %f percent confidence' % (100 - 100*output[0])
|
|
|
|
|
|
|
|
|
181 |
|
182 |
return output, input_image, activation_1, activation_2
|
183 |
|
|
|
178 |
output = 'Planet predicted with %f percent confidence' % (100*output[1])
|
179 |
else:
|
180 |
output = 'No planet predicted with %f percent confidence' % (100 - 100*output[0])
|
181 |
+
|
182 |
+
input_image = normalize_array(input_image)
|
183 |
+
activation_1 = normalize_array(activation_1)
|
184 |
+
activation_2 = normalize_array(activation_2)
|
185 |
|
186 |
return output, input_image, activation_1, activation_2
|
187 |
|