Hammad712 commited on
Commit
6447504
·
verified ·
1 Parent(s): 25f1530

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
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):