ppsingh commited on
Commit
68835bd
·
1 Parent(s): 28f514c

target stats

Browse files
Files changed (2) hide show
  1. appStore/doc_processing.py +2 -2
  2. appStore/target.py +9 -4
appStore/doc_processing.py CHANGED
@@ -73,8 +73,8 @@ def app():
73
  st.session_state['key0'] = df
74
  # if os.path.splitext(file_name)[-1] == 'pdf':
75
  st.session_state['pages'] = df.loc[len(df)-1,'page']
76
- st.info('**{}** with ~{} pages is splitted into {} paragraphs/text chunks (page number is **True** only for pdf files)'\
77
- .format(os.path.basename(file_name),st.session_state['pages'], len(df)), icon="ℹ️")
78
 
79
 
80
  else:
 
73
  st.session_state['key0'] = df
74
  # if os.path.splitext(file_name)[-1] == 'pdf':
75
  st.session_state['pages'] = df.loc[len(df)-1,'page']
76
+ # st.info('**{}** with ~{} pages is splitted into {} paragraphs/text chunks (page number is **True** only for pdf files)'\
77
+ # .format(os.path.basename(file_name),st.session_state['pages'], len(df)), icon="ℹ️")
78
 
79
 
80
  else:
appStore/target.py CHANGED
@@ -79,14 +79,19 @@ def app():
79
  def target_display():
80
  if 'key1' in st.session_state:
81
  df = st.session_state.key1
82
- st.info('**{}** with ~{} pages is splitted into {} paragraphs/text chunks (page number is **True** only for pdf files)'\
83
- .format(os.path.basename(st.session_state['filename']),st.session_state['pages'], len(df)), icon="ℹ️")
 
 
84
 
85
- st.caption("""Some Targets are an intention to achieve a specific result, \
86
  for example, to reduce GHG emissions to a specific level \
87
  (a GHG target) or increase energy efficiency or renewable \
88
  energy to a specific level (a non-GHG target), typically by \
89
  a certain date""")
 
 
 
90
  hits = df[df['Target Label'] == 'TARGET']
91
  range_val = min(5,len(hits))
92
  if range_val !=0:
@@ -105,7 +110,7 @@ def target_display():
105
  st.write('**GHG Target Related Paragraphs**: `{}`'.format(count_ghg))
106
  st.write('**Economy-wide Related Paragraphs**: `{}`'.format(count_economy))
107
  st.write('-------------------')
108
- hits = hits.sort_values(by=['Relevancy'], ascending=False)
109
  netzerohit = hits[hits['Netzero Label'] == 'NETZERO']
110
  if not netzerohit.empty:
111
  netzerohit = netzerohit.sort_values(by = ['Netzero Score'], ascending = False)
 
79
  def target_display():
80
  if 'key1' in st.session_state:
81
  df = st.session_state.key1
82
+ st.caption(""" **{}** with ~{} pages is splitted into {} paragraphs/text chunks \
83
+ (page number is **True** only for pdf files)"""\
84
+ .format(os.path.basename(st.session_state['filename']),
85
+ st.session_state['pages'], len(df)))
86
 
87
+ st.caption("""Target(Definition): Targets are an intention to achieve a specific result, \
88
  for example, to reduce GHG emissions to a specific level \
89
  (a GHG target) or increase energy efficiency or renewable \
90
  energy to a specific level (a non-GHG target), typically by \
91
  a certain date""")
92
+ st.caption("""Economy-wide Target (Definition): Certain Target are applicable \
93
+ not at specific Sector level but are applicable at economic \
94
+ wide scale. """)
95
  hits = df[df['Target Label'] == 'TARGET']
96
  range_val = min(5,len(hits))
97
  if range_val !=0:
 
110
  st.write('**GHG Target Related Paragraphs**: `{}`'.format(count_ghg))
111
  st.write('**Economy-wide Related Paragraphs**: `{}`'.format(count_economy))
112
  st.write('-------------------')
113
+ hits = hits.sort_values(by=['Target Score'], ascending=False)
114
  netzerohit = hits[hits['Netzero Label'] == 'NETZERO']
115
  if not netzerohit.empty:
116
  netzerohit = netzerohit.sort_values(by = ['Netzero Score'], ascending = False)