leavoigt commited on
Commit
82f5e0e
1 Parent(s): cd7bf6b

Rename utils/utils_target_classifier.py to utils/target_classifier.py

Browse files
utils/{utils_target_classifier.py → target_classifier.py} RENAMED
@@ -10,8 +10,8 @@ from transformers import pipeline
10
 
11
  ## Labels dictionary ###
12
  _lab_dict = {
13
- 'NEGATIVE':'NO TARGET INFO',
14
- 'TARGET':'TARGET',
15
  }
16
 
17
  @st.cache_resource
@@ -53,9 +53,8 @@ def target_classification(haystack_doc:pd.DataFrame,
53
  )->Tuple[DataFrame,Series]:
54
  """
55
  Text-Classification on the list of texts provided. Classifier provides the
56
- most appropriate label for each text. these labels are in terms of if text
57
- belongs to which particular Sustainable Devleopment Goal (SDG).
58
- Params
59
  ---------
60
  haystack_doc: List of haystack Documents. The output of Preprocessing Pipeline
61
  contains the list of paragraphs in different format,here the list of
@@ -70,7 +69,7 @@ def target_classification(haystack_doc:pd.DataFrame,
70
  x: Series object with the unique SDG covered in the document uploaded and
71
  the number of times it is covered/discussed/count_of_paragraphs.
72
  """
73
- logging.info("Working on Target Extraction")
74
  if not classifier_model:
75
  classifier_model = st.session_state['target_classifier']
76
 
 
10
 
11
  ## Labels dictionary ###
12
  _lab_dict = {
13
+ '0':'NO',
14
+ '1':'YES',
15
  }
16
 
17
  @st.cache_resource
 
53
  )->Tuple[DataFrame,Series]:
54
  """
55
  Text-Classification on the list of texts provided. Classifier provides the
56
+ most appropriate label for each text. There labels indicate whether the paragraph
57
+ references a specific action, target or measure in the paragraph.
 
58
  ---------
59
  haystack_doc: List of haystack Documents. The output of Preprocessing Pipeline
60
  contains the list of paragraphs in different format,here the list of
 
69
  x: Series object with the unique SDG covered in the document uploaded and
70
  the number of times it is covered/discussed/count_of_paragraphs.
71
  """
72
+ logging.info("Working on action/target extraction")
73
  if not classifier_model:
74
  classifier_model = st.session_state['target_classifier']
75