Update main.py
Browse files
main.py
CHANGED
@@ -45,7 +45,7 @@ def inference(file_path):
|
|
45 |
prediction = loaded_model.predict(mel_spectrogram_db)
|
46 |
predicted_label = np.argmax(prediction, axis=-1)
|
47 |
|
48 |
-
return int(predicted_label[0])
|
49 |
|
50 |
@app.post("/predict")
|
51 |
async def predict(file: UploadFile):
|
|
|
45 |
prediction = loaded_model.predict(mel_spectrogram_db)
|
46 |
predicted_label = np.argmax(prediction, axis=-1)
|
47 |
|
48 |
+
return "depressed" if int(predicted_label[0]) == 1 else "non-depressed"
|
49 |
|
50 |
@app.post("/predict")
|
51 |
async def predict(file: UploadFile):
|