tonyliu404 commited on
Commit
b2cbd6e
·
verified ·
1 Parent(s): 9b14029

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -235,10 +235,10 @@ def classifyImage(input_image):
235
  # Add a batch dimension
236
  input_array = tf.expand_dims(input_array, 0) # (1, 224, 224, 3)
237
 
238
- temp = tf.nn.softmax(predictions).numpy()
239
- print("SOFTMAX PREDICTIONS",temp)
240
  predictions = model.predict(input_array)[0]
241
- print(f"Predictions: {predictions}")
 
 
242
 
243
  # Sort predictions to get top 5
244
  top_indices = np.argsort(predictions)[-5:][::-1]
 
235
  # Add a batch dimension
236
  input_array = tf.expand_dims(input_array, 0) # (1, 224, 224, 3)
237
 
 
 
238
  predictions = model.predict(input_array)[0]
239
+ print(f"Predictions BEFORE SOFTMAX: {predictions}")
240
+ predictions = tf.nn.softmax(predictions).numpy()
241
+ print(f"Predictions AFTER SOFTMAX: {predictions}")
242
 
243
  # Sort predictions to get top 5
244
  top_indices = np.argsort(predictions)[-5:][::-1]