Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -85,9 +85,15 @@ def process_api(text):
|
|
85 |
SVM_Predicted = SVM_model.predict(processed_text).tolist() # SVC Model
|
86 |
# Seq_Predicted = Seq_model.predict(padded_sequence)
|
87 |
# predicted_label_index = np.argmax(Seq_Predicted)
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
return {
|
89 |
-
'Logistic_Predicted':
|
90 |
-
'SVM_Predicted':
|
91 |
'Article_Content': text
|
92 |
}
|
93 |
|
|
|
85 |
SVM_Predicted = SVM_model.predict(processed_text).tolist() # SVC Model
|
86 |
# Seq_Predicted = Seq_model.predict(padded_sequence)
|
87 |
# predicted_label_index = np.argmax(Seq_Predicted)
|
88 |
+
|
89 |
+
test1 = categorize(int(Logistic_Predicted[0]))
|
90 |
+
test2 = categorize(int(SVM_Predicted[0]))
|
91 |
+
print('Logistic', int(Logistic_Predicted[0]), test1)
|
92 |
+
print('SVM', int(SVM_Predicted[0]), test2)
|
93 |
+
|
94 |
return {
|
95 |
+
'Logistic_Predicted':int(Logistic_Predicted[0]),
|
96 |
+
'SVM_Predicted': int(SVM_Predicted[0]),
|
97 |
'Article_Content': text
|
98 |
}
|
99 |
|