Spaces:
Sleeping
Sleeping
deveix
commited on
Commit
·
27b275b
1
Parent(s):
b656d7a
fix sheikh name
Browse files- app/main.py +3 -2
app/main.py
CHANGED
@@ -311,12 +311,13 @@ async def handle_cnn(file: UploadFile = File(...)):
|
|
311 |
predicted_labels = cnn_label_encoder.inverse_transform(predicted_label_indexes)
|
312 |
|
313 |
print('decoded', predicted_labels)
|
314 |
-
print('arg', np.argmax(predicted_labels
|
|
|
315 |
# .tolist()
|
316 |
# Clean up the temporary file
|
317 |
os.remove(temp_filename)
|
318 |
# Return a successful response with decoded predictions
|
319 |
-
return {"message": "File processed successfully", "sheikh":
|
320 |
except Exception as e:
|
321 |
print(e)
|
322 |
# Handle possible exceptions
|
|
|
311 |
predicted_labels = cnn_label_encoder.inverse_transform(predicted_label_indexes)
|
312 |
|
313 |
print('decoded', predicted_labels)
|
314 |
+
print('arg', np.argmax(predicted_labels))
|
315 |
+
sheikh_name = np.argmax(predicted_labels)
|
316 |
# .tolist()
|
317 |
# Clean up the temporary file
|
318 |
os.remove(temp_filename)
|
319 |
# Return a successful response with decoded predictions
|
320 |
+
return {"message": "File processed successfully", "sheikh": sheikh_name}
|
321 |
except Exception as e:
|
322 |
print(e)
|
323 |
# Handle possible exceptions
|