achmaddhani commited on
Commit
f7d313c
·
1 Parent(s): af6c457

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +3 -3
functions.py CHANGED
@@ -44,8 +44,8 @@ def prediction(model, X):
44
  predictions = np.argmax(y_pred, axis=1)
45
  for index, val in enumerate(predictions):
46
  if val == 0:
47
- print(f"Text {index} indicates the person is feeling FEAR")
48
  elif val == 1:
49
- print(f"Text {index} indicates the person is feeling ANGER")
50
  else:
51
- print(f"Text {index} indicates the person is feeling JOY")
 
44
  predictions = np.argmax(y_pred, axis=1)
45
  for index, val in enumerate(predictions):
46
  if val == 0:
47
+ return f"Text {index} indicates the person is feeling FEAR"
48
  elif val == 1:
49
+ return f"Text {index} indicates the person is feeling ANGER"
50
  else:
51
+ return f"Text {index} indicates the person is feeling JOY"