MINHCT commited on
Commit
3a827ad
1 Parent(s): 3890fa9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -106,7 +106,7 @@ def process_api(text):
106
 
107
  return {
108
  'predicted_label_logistic': decodedLabel(int(Logistic_Predicted[0])),
109
- 'probability_logistic': int(float(np.max(Logistic_Predicted_proba))*10000//100), # Thêm phần xác suất từ mô hình Seq_Predicted vào đây
110
  'SVM_Predicted': decodedLabel(int(SVM_Predicted[0])),
111
  # 'LSTM': decodedLabel(int(predicted_label_index)),
112
  'Article_Content': text
@@ -216,8 +216,8 @@ if url:
216
  st.title('Predicted Results')
217
  st.json({
218
  "Logistic": {
219
- "predicted_label": result.get("predicted_label_logistic"),
220
- "probability": result.get("probability_logistic")
221
  },
222
  "SVC": result.get("SVM_Predicted"),
223
  # "LSTM": result.get("LSTM")
 
106
 
107
  return {
108
  'predicted_label_logistic': decodedLabel(int(Logistic_Predicted[0])),
109
+ 'probability_logistic': int(float(np.max(Logistic_Predicted_proba))*10000//100),
110
  'SVM_Predicted': decodedLabel(int(SVM_Predicted[0])),
111
  # 'LSTM': decodedLabel(int(predicted_label_index)),
112
  'Article_Content': text
 
216
  st.title('Predicted Results')
217
  st.json({
218
  "Logistic": {
219
+ "predicted_label_logistic": result.get("predicted_label_logistic"),
220
+ "probability_logistic": result.get("probability_logistic")
221
  },
222
  "SVC": result.get("SVM_Predicted"),
223
  # "LSTM": result.get("LSTM")