kovacsvi commited on
Commit
6964453
·
1 Parent(s): e79f633

removed debug prints

Browse files
Files changed (1) hide show
  1. interfaces/cap_minor_media.py +0 -4
interfaces/cap_minor_media.py CHANGED
@@ -95,20 +95,16 @@ def predict(text, major_model_id, minor_model_id, tokenizer_id, HF_TOKEN=None):
95
  top_major_id = major_index_to_id[top_major_index]
96
 
97
  # Default: show major topic predictions
98
- print(major_probs_np) # debug
99
  filtered_probs = {
100
  i: float(major_probs_np[i])
101
  for i in np.argsort(major_probs_np)[::-1]
102
  }
103
- print(filtered_probs) # debug
104
  filtered_probs = normalize_probs(filtered_probs)
105
- print(filtered_probs) # debug
106
 
107
  output_pred = {
108
  f"[{major_index_to_id[k]}] {CAP_MEDIA_LABEL_NAMES[major_index_to_id[k]]}": v
109
  for k, v in sorted(filtered_probs.items(), key=lambda item: item[1], reverse=True)
110
  }
111
- print(output_pred) # debug
112
 
113
  # If eligible for minor prediction
114
  if top_major_id in major_to_minor_map:
 
95
  top_major_id = major_index_to_id[top_major_index]
96
 
97
  # Default: show major topic predictions
 
98
  filtered_probs = {
99
  i: float(major_probs_np[i])
100
  for i in np.argsort(major_probs_np)[::-1]
101
  }
 
102
  filtered_probs = normalize_probs(filtered_probs)
 
103
 
104
  output_pred = {
105
  f"[{major_index_to_id[k]}] {CAP_MEDIA_LABEL_NAMES[major_index_to_id[k]]}": v
106
  for k, v in sorted(filtered_probs.items(), key=lambda item: item[1], reverse=True)
107
  }
 
108
 
109
  # If eligible for minor prediction
110
  if top_major_id in major_to_minor_map: