round off
Browse files- utils/ghg_classifier.py +2 -1
- utils/netzero_classifier.py +2 -1
utils/ghg_classifier.py
CHANGED
@@ -71,7 +71,7 @@ def ghg_classification(haystack_doc:pd.DataFrame,
|
|
71 |
"""
|
72 |
logging.info("Working on GHG Extraction")
|
73 |
haystack_doc['GHG Label'] = 'NA'
|
74 |
-
haystack_doc['GHG Score'] =
|
75 |
# applying GHG Identifier to only 'Target' paragraphs.
|
76 |
temp = haystack_doc[haystack_doc['Target Label'] == 'TARGET']
|
77 |
temp = temp.reset_index(drop=True)
|
@@ -88,6 +88,7 @@ def ghg_classification(haystack_doc:pd.DataFrame,
|
|
88 |
# merge back Target and non-Target dataframe
|
89 |
df = pd.concat([df,temp])
|
90 |
df = df.reset_index(drop =True)
|
|
|
91 |
df.index += 1
|
92 |
|
93 |
return df
|
|
|
71 |
"""
|
72 |
logging.info("Working on GHG Extraction")
|
73 |
haystack_doc['GHG Label'] = 'NA'
|
74 |
+
haystack_doc['GHG Score'] = 0.0
|
75 |
# applying GHG Identifier to only 'Target' paragraphs.
|
76 |
temp = haystack_doc[haystack_doc['Target Label'] == 'TARGET']
|
77 |
temp = temp.reset_index(drop=True)
|
|
|
88 |
# merge back Target and non-Target dataframe
|
89 |
df = pd.concat([df,temp])
|
90 |
df = df.reset_index(drop =True)
|
91 |
+
df['GH Score'] = df['GH Score'].round(2)
|
92 |
df.index += 1
|
93 |
|
94 |
return df
|
utils/netzero_classifier.py
CHANGED
@@ -70,7 +70,7 @@ def netzero_classification(haystack_doc:pd.DataFrame,
|
|
70 |
"""
|
71 |
logging.info("Working on Netzero Extraction")
|
72 |
haystack_doc['Netzero Label'] = 'NA'
|
73 |
-
haystack_doc['Netzero Score'] =
|
74 |
# we apply Netzero to only paragraphs which are classified as 'Target' related
|
75 |
temp = haystack_doc[haystack_doc['Target Label'] == 'TARGET']
|
76 |
temp = temp.reset_index(drop=True)
|
@@ -87,6 +87,7 @@ def netzero_classification(haystack_doc:pd.DataFrame,
|
|
87 |
# merging Target with Non Target dataframe
|
88 |
df = pd.concat([df,temp])
|
89 |
df = df.reset_index(drop =True)
|
|
|
90 |
df.index += 1
|
91 |
|
92 |
return df
|
|
|
70 |
"""
|
71 |
logging.info("Working on Netzero Extraction")
|
72 |
haystack_doc['Netzero Label'] = 'NA'
|
73 |
+
haystack_doc['Netzero Score'] = 0.0
|
74 |
# we apply Netzero to only paragraphs which are classified as 'Target' related
|
75 |
temp = haystack_doc[haystack_doc['Target Label'] == 'TARGET']
|
76 |
temp = temp.reset_index(drop=True)
|
|
|
87 |
# merging Target with Non Target dataframe
|
88 |
df = pd.concat([df,temp])
|
89 |
df = df.reset_index(drop =True)
|
90 |
+
df['Netzero Score'] = df['Netzero Score'].round(2)
|
91 |
df.index += 1
|
92 |
|
93 |
return df
|