Spaces:
Running
Running
deveix
commited on
Commit
·
b80ec6f
1
Parent(s):
3ea682e
fix predictions
Browse files- app/main.py +2 -2
app/main.py
CHANGED
@@ -324,13 +324,13 @@ async def handle_cnn(file: UploadFile = File(...)):
|
|
324 |
|
325 |
# Make predictions
|
326 |
predictions = cnn_model.predict(X)
|
327 |
-
print('predictions',
|
328 |
|
329 |
# Convert predictions to label indexes
|
330 |
predicted_label_indexes = np.argmax(predictions)
|
331 |
|
332 |
# Convert label indexes to actual label names
|
333 |
-
predicted_labels = cnn_label_encoder.inverse_transform(predicted_label_indexes)
|
334 |
|
335 |
print('decoded', predicted_labels)
|
336 |
reciter_name = predicted_labels[0]
|
|
|
324 |
|
325 |
# Make predictions
|
326 |
predictions = cnn_model.predict(X)
|
327 |
+
print('predictions', predictions)
|
328 |
|
329 |
# Convert predictions to label indexes
|
330 |
predicted_label_indexes = np.argmax(predictions)
|
331 |
|
332 |
# Convert label indexes to actual label names
|
333 |
+
predicted_labels = cnn_label_encoder.inverse_transform([predicted_label_indexes])
|
334 |
|
335 |
print('decoded', predicted_labels)
|
336 |
reciter_name = predicted_labels[0]
|