Spaces:
Sleeping
Sleeping
Update utils/target_classifier.py
Browse files
utils/target_classifier.py
CHANGED
@@ -107,18 +107,13 @@ def target_classification(haystack_doc:pd.DataFrame,
|
|
107 |
if not classifier_model:
|
108 |
|
109 |
classifier_model = st.session_state['target_classifier']
|
110 |
-
st.write("utils - classifier model")
|
111 |
-
st.write(classifier_model)
|
112 |
|
113 |
# Get predictions
|
114 |
predictions = classifier_model(list(haystack_doc.text))
|
115 |
-
st.write('predictions')
|
116 |
-
st.write(predictions[:10])
|
117 |
|
118 |
# Get labels for predictions
|
119 |
pred_labels = get_target_labels(predictions)
|
120 |
-
|
121 |
-
st.write(pred_labels[:10])
|
122 |
# Save labels
|
123 |
haystack_doc['Target Label'] = pred_labels
|
124 |
|
|
|
107 |
if not classifier_model:
|
108 |
|
109 |
classifier_model = st.session_state['target_classifier']
|
|
|
|
|
110 |
|
111 |
# Get predictions
|
112 |
predictions = classifier_model(list(haystack_doc.text))
|
|
|
|
|
113 |
|
114 |
# Get labels for predictions
|
115 |
pred_labels = get_target_labels(predictions)
|
116 |
+
|
|
|
117 |
# Save labels
|
118 |
haystack_doc['Target Label'] = pred_labels
|
119 |
|