ppsingh commited on
Commit
51bfac9
1 Parent(s): af62892

policy action error fix

Browse files
Files changed (2) hide show
  1. app.py +3 -4
  2. utils/policyaction_classifier.py +3 -4
app.py CHANGED
@@ -60,10 +60,9 @@ with st.expander("ℹ️ - About this app", expanded=False):
60
  not at specific Sector level but are applicable at economic \
61
  wide scale. """)
62
  st.write("")
63
- apps = [processing.app, target_extraction.app]
64
- # policyaction.app]
65
- #, netzero.app, ghg.app,
66
- # policyaction.app, indicator.app, conditional.app, sector.app]
67
  #adapmit.app]
68
 
69
  # policyaction.app, indicator.app, ]
 
60
  not at specific Sector level but are applicable at economic \
61
  wide scale. """)
62
  st.write("")
63
+ apps = [processing.app, target_extraction.app, netzero.app, ghg.app,
64
+ policyaction.app, indicator.app]
65
+ #conditional.app, sector.app]
 
66
  #adapmit.app]
67
 
68
  # policyaction.app, indicator.app, ]
utils/policyaction_classifier.py CHANGED
@@ -93,9 +93,8 @@ def policyaction_classification(haystack_doc:pd.DataFrame,
93
  list(x['Policy-Action Label'] -{None}),axis=1)
94
 
95
  haystack_doc['Policy-Action Label'] = list(truth_df['Policy-Action Label'])
96
- haystack_doc['Policy-Action Label'] = haystack_doc.apply(lambda x:x
97
- if x['Policy-Action Label'] else
98
- ['NA'],axis=1)
99
- st.dataframe(haystack_doc)
100
 
101
  return haystack_doc
 
93
  list(x['Policy-Action Label'] -{None}),axis=1)
94
 
95
  haystack_doc['Policy-Action Label'] = list(truth_df['Policy-Action Label'])
96
+ haystack_doc['Policy-Action Label'] = haystack_doc['Policy-Action Label'].apply(
97
+ lambda x:x if x else ['NA'],axis=1)
98
+ # st.dataframe(haystack_doc)
 
99
 
100
  return haystack_doc