UI fix
Browse files- app.py +6 -0
- appStore/target.py +5 -3
app.py
CHANGED
|
@@ -41,6 +41,12 @@ with st.expander("ℹ️ - About this app", expanded=False):
|
|
| 41 |
- Step 3: The paragraphs which are detected containing some target \
|
| 42 |
related information are then fed to multiple classifier to enrich the
|
| 43 |
Information Extraction.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
""")
|
| 46 |
st.write("")
|
|
|
|
| 41 |
- Step 3: The paragraphs which are detected containing some target \
|
| 42 |
related information are then fed to multiple classifier to enrich the
|
| 43 |
Information Extraction.
|
| 44 |
+
Classifers:
|
| 45 |
+
- **Netzero**: Detects if any Netzero commitment is prresent in paragraph or not.
|
| 46 |
+
- **GHG**: Detects if any GHG related information present in paragraph or not.
|
| 47 |
+
- **Sector**: Detects which sectors are spoken/dsicussed about in paragraph.
|
| 48 |
+
- **Adaptation-Mitigation**: Detects if the pragraph is related to Adaptation and/or Mitigation.
|
| 49 |
+
|
| 50 |
|
| 51 |
""")
|
| 52 |
st.write("")
|
appStore/target.py
CHANGED
|
@@ -119,19 +119,21 @@ def target_display():
|
|
| 119 |
with c2:
|
| 120 |
st.write('**GHG Related Paragraphs**: `{}`'.format(count_ghg))
|
| 121 |
st.write('**Economy-wide Related Paragraphs**: `{}`'.format(count_economy))
|
| 122 |
-
|
| 123 |
hits = hits.sort_values(by=['Relevancy'], ascending=False)
|
| 124 |
netzerohit = hits[hits['Netzero Label'] == 'NETZERO']
|
| 125 |
if not netzerohit.empty:
|
| 126 |
netzerohit = netzerohit.sort_values(by = ['Netzero Score'], ascending = False)
|
| 127 |
-
st.
|
| 128 |
-
st.
|
|
|
|
| 129 |
netzerohit.iloc[0]['text'].replace("\n", " ")))
|
| 130 |
st.write("")
|
| 131 |
else:
|
| 132 |
st.info("🤔 No Netzero paragraph found")
|
| 133 |
|
| 134 |
# st.write("**Result {}** `page {}` (Relevancy Score: {:.2f})'".format(i+1,hits.iloc[i]['page'],hits.iloc[i]['Relevancy'])")
|
|
|
|
| 135 |
st.markdown("###### Top few Target Classified paragraph/text results ######")
|
| 136 |
range_val = min(5,len(hits))
|
| 137 |
for i in range(range_val):
|
|
|
|
| 119 |
with c2:
|
| 120 |
st.write('**GHG Related Paragraphs**: `{}`'.format(count_ghg))
|
| 121 |
st.write('**Economy-wide Related Paragraphs**: `{}`'.format(count_economy))
|
| 122 |
+
st.write('-------------------')
|
| 123 |
hits = hits.sort_values(by=['Relevancy'], ascending=False)
|
| 124 |
netzerohit = hits[hits['Netzero Label'] == 'NETZERO']
|
| 125 |
if not netzerohit.empty:
|
| 126 |
netzerohit = netzerohit.sort_values(by = ['Netzero Score'], ascending = False)
|
| 127 |
+
# st.write('-------------------')
|
| 128 |
+
# st.markdown("###### Netzero paragraph ######")
|
| 129 |
+
st.write('** Netzero paragraph `page {}`: {}'.format(netzerohit.iloc[0]['page'],
|
| 130 |
netzerohit.iloc[0]['text'].replace("\n", " ")))
|
| 131 |
st.write("")
|
| 132 |
else:
|
| 133 |
st.info("🤔 No Netzero paragraph found")
|
| 134 |
|
| 135 |
# st.write("**Result {}** `page {}` (Relevancy Score: {:.2f})'".format(i+1,hits.iloc[i]['page'],hits.iloc[i]['Relevancy'])")
|
| 136 |
+
st.write('-------------------')
|
| 137 |
st.markdown("###### Top few Target Classified paragraph/text results ######")
|
| 138 |
range_val = min(5,len(hits))
|
| 139 |
for i in range(range_val):
|