jpterry commited on
Commit
c024fb4
·
1 Parent(s): b99b0e8
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -313,10 +313,10 @@ def predict_and_analyze(model_name, num_channels, dim, input_channel, image):
313
  sub_mean=True)
314
  print("Activations and predictions finished")
315
 
316
- if output[0] < output[1]:
317
- output = 'Planet predicted with %.3f percent confidence' % (100*output[1])
318
  else:
319
- output = 'No planet predicted with %.3f percent confidence' % (100*output[0])
320
 
321
  input_image = normalize_array(input_image)
322
  activation_1 = normalize_array(activation_1)
 
313
  sub_mean=True)
314
  print("Activations and predictions finished")
315
 
316
+ if output[0][0] < output[0][1]:
317
+ output = 'Planet predicted with %.3f percent confidence' % (100*output[0][1])
318
  else:
319
+ output = 'No planet predicted with %.3f percent confidence' % (100*output[0][0])
320
 
321
  input_image = normalize_array(input_image)
322
  activation_1 = normalize_array(activation_1)