Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,9 @@ def process_api(text):
|
|
109 |
return {
|
110 |
'predicted_label_logistic': decodedLabel(int(Logistic_Predicted[0])),
|
111 |
'probability_logistic': f"{int(float(np.max(Logistic_Predicted_proba))*10000//100)}%",
|
112 |
-
|
|
|
|
|
113 |
# 'LSTM': decodedLabel(int(predicted_label_index)),
|
114 |
'Article_Content': text
|
115 |
}
|
@@ -221,8 +223,10 @@ if url:
|
|
221 |
"predicted_label": result.get("predicted_label_logistic"),
|
222 |
"probability": result.get("probability_logistic")
|
223 |
},
|
224 |
-
"
|
225 |
-
|
|
|
|
|
226 |
# "LSTM": result.get("LSTM")
|
227 |
})
|
228 |
|
|
|
109 |
return {
|
110 |
'predicted_label_logistic': decodedLabel(int(Logistic_Predicted[0])),
|
111 |
'probability_logistic': f"{int(float(np.max(Logistic_Predicted_proba))*10000//100)}%",
|
112 |
+
|
113 |
+
'predicted_label_svm': decodedLabel(int(SVM_Predicted[0])),
|
114 |
+
'probability_svm': f"{int(float(np.max(svm_probs))*10000//100)}%",
|
115 |
# 'LSTM': decodedLabel(int(predicted_label_index)),
|
116 |
'Article_Content': text
|
117 |
}
|
|
|
223 |
"predicted_label": result.get("predicted_label_logistic"),
|
224 |
"probability": result.get("probability_logistic")
|
225 |
},
|
226 |
+
"SVC": {
|
227 |
+
"predicted_label": result.get("predicted_label_svm"),
|
228 |
+
"probability": result.get("probability_svm")
|
229 |
+
},
|
230 |
# "LSTM": result.get("LSTM")
|
231 |
})
|
232 |
|