leavoigt commited on
Commit
f691218
1 Parent(s): 8ca2c43

Update utils/target_classifier.py

Browse files
Files changed (1) hide show
  1. utils/target_classifier.py +6 -9
utils/target_classifier.py CHANGED
@@ -27,7 +27,7 @@ def get_target_labels(preds):
27
  predictions_names=[]
28
 
29
  # loop through each prediction
30
- for ele in preds_list:
31
 
32
  # see if there is a value 1 and retrieve index
33
  try:
@@ -105,18 +105,15 @@ def target_classification(haystack_doc:pd.DataFrame,
105
  logging.info("Working on target/action identification")
106
 
107
  haystack_doc['Target Label'] = 'NA'
108
-
109
- ## TEST DELETE ###
110
- if classifier_model:
111
- st.write("This is the classifier model")
112
- st.write(classifier_model)
113
-
114
  if not classifier_model:
115
 
116
- target_classifier_model = st.session_state['target_classifier']
 
 
117
 
118
  # Get predictions
119
- predictions = target_classifier_model(list(haystack_doc.text))
120
  st.write('predictions')
121
  st.write(predictions[:10])
122
 
 
27
  predictions_names=[]
28
 
29
  # loop through each prediction
30
+ for ele in preds:
31
 
32
  # see if there is a value 1 and retrieve index
33
  try:
 
105
  logging.info("Working on target/action identification")
106
 
107
  haystack_doc['Target Label'] = 'NA'
108
+
 
 
 
 
 
109
  if not classifier_model:
110
 
111
+ classifier_model = st.session_state['target_classifier']
112
+ st.write("utils - classifier model")
113
+ st.write(classifier_model)
114
 
115
  # Get predictions
116
+ predictions = classifier_model(list(haystack_doc.text))
117
  st.write('predictions')
118
  st.write(predictions[:10])
119