Spaces:
Running
Running
Update app.py
Browse files
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]
|