Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -108,7 +108,7 @@ def process_api(text):
|
|
108 |
|
109 |
return {
|
110 |
'predicted_label_logistic': decodedLabel(int(Logistic_Predicted[0])),
|
111 |
-
|
112 |
'SVM_Predicted': decodedLabel(int(SVM_Predicted[0])),
|
113 |
# 'LSTM': decodedLabel(int(predicted_label_index)),
|
114 |
'Article_Content': text
|
@@ -217,10 +217,10 @@ if url:
|
|
217 |
st.divider() # π Draws a horizontal rule
|
218 |
st.title('Predicted Results')
|
219 |
st.json({
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
"Logistic": result.get("predicted_label_logistic"),
|
225 |
"SVC": result.get("SVM_Predicted"),
|
226 |
# "LSTM": result.get("LSTM")
|
|
|
108 |
|
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 |
'SVM_Predicted': decodedLabel(int(SVM_Predicted[0])),
|
113 |
# 'LSTM': decodedLabel(int(predicted_label_index)),
|
114 |
'Article_Content': text
|
|
|
217 |
st.divider() # π Draws a horizontal rule
|
218 |
st.title('Predicted Results')
|
219 |
st.json({
|
220 |
+
"Logistic": {
|
221 |
+
"predicted_label": result.get("predicted_label_logistic"),
|
222 |
+
"probability": result.get("probability_logistic")
|
223 |
+
},
|
224 |
"Logistic": result.get("predicted_label_logistic"),
|
225 |
"SVC": result.get("SVM_Predicted"),
|
226 |
# "LSTM": result.get("LSTM")
|