ajeetkumar01 commited on
Commit
9c0854b
1 Parent(s): 9ab3705

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -58,7 +58,10 @@ def main():
58
 
59
  # Make prediction
60
  response = model.predict(processed_text)
61
- predicted_class = response.argmax(axis=-1)
 
 
 
62
  # Display the prediction result
63
  st.write("Predicted Mental State:", predicted_class)
64
 
 
58
 
59
  # Make prediction
60
  response = model.predict(processed_text)
61
+ predicted_class = response.argmax(axis=-1)[0]
62
+ # Map the predicted class index to the corresponding label
63
+ predicted_label = class_labels.get(predicted_class, "Unknown")
64
+
65
  # Display the prediction result
66
  st.write("Predicted Mental State:", predicted_class)
67