jpterry commited on
Commit
db6d128
·
1 Parent(s): faf81d4
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -175,7 +175,10 @@ def predict_and_analyze(model_name, num_channels, dim, image):
175
  print("Looking at activations")
176
  output, activation_1, activation_2 = get_activations(model, image, sub_mean=True)
177
 
178
- output = 'Planet prediction with %f percent confidence' % (100*output)
 
 
 
179
 
180
  return output, input_image, activation_1, activation_2
181
 
 
175
  print("Looking at activations")
176
  output, activation_1, activation_2 = get_activations(model, image, sub_mean=True)
177
 
178
+ if output[0] < output[1]:
179
+ output = 'Planet prediction with %f percent confidence' % (100*output[1])
180
+ else:
181
+ output = 'No planet prediction with %f percent confidence' % (100 - 100*output[0])
182
 
183
  return output, input_image, activation_1, activation_2
184