ajeetkumar01 commited on
Commit
5feb2de
·
verified ·
1 Parent(s): 9837a81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -69,14 +69,14 @@ def main():
69
  # Make prediction
70
  response = model.predict(processed_text)
71
  predicted_class = response.argmax(axis=-1)[0]
72
- # Map the predicted class index to the corresponding label
73
- st.write("Predicted Index:", predicted_class)
74
- st.write("Predicted Mental State:", predicted_label)
75
 
 
76
  predicted_label = class_labels.get(predicted_class, "Unknown")
77
-
78
- # Display the prediction result
 
79
  st.write("Predicted Mental State:", predicted_label)
80
 
 
81
  if __name__ == "__main__":
82
  main()
 
69
  # Make prediction
70
  response = model.predict(processed_text)
71
  predicted_class = response.argmax(axis=-1)[0]
 
 
 
72
 
73
+ # Ensure the predicted_label is always assigned
74
  predicted_label = class_labels.get(predicted_class, "Unknown")
75
+
76
+ # Display the predicted index and label
77
+ st.write("Predicted Index:", predicted_class)
78
  st.write("Predicted Mental State:", predicted_label)
79
 
80
+
81
  if __name__ == "__main__":
82
  main()