hamdie commited on
Commit
14d439d
1 Parent(s): 8ce479f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,8 +44,8 @@ def sentiment_analysis(text):
44
  X_input_ids, X_attention_mask = preprocess_input_data(text, arabert_tokenizer)
45
  preds = model(X_input_ids)
46
  import numpy as np
47
- predicted_class=list(np.where(preds <0.5,0,1).reshape(len(preds),1))
48
-
49
  return predicted_class
50
 
51
 
 
44
  X_input_ids, X_attention_mask = preprocess_input_data(text, arabert_tokenizer)
45
  preds = model(X_input_ids)
46
  import numpy as np
47
+ predicted_classe=list(np.where(preds <0.5,0,1).reshape(len(preds),1))
48
+ predicted_class = ''.join(str(x) for x in np.where(preds < 0.5, 0, 1).flatten())
49
  return predicted_class
50
 
51