import streamlit as st st.set_page_config(f'SDSN x GIZ Policy Tracing', layout="wide") import seaborn as sns import pdfplumber from pandas import DataFrame from keybert import KeyBERT import matplotlib.pyplot as plt import numpy as np import streamlit as st ##@st.cache(allow_output_mutation=True) def load_model(): return KeyBERT() kw_model = load_model() keywords = kw_model.extract_keywords( text_str, keyphrase_ngram_range=(1, 2), use_mmr=True, stop_words="english", top_n=15, diversity=0.7, ) with st.container(): st.markdown("

Policy Action Tracking

", unsafe_allow_html=True) st.write(' ') st.write(' ') with st.expander("ℹī¸ - About this app", expanded=True): st.write( """ The *Policy Action Tracker* app is an easy-to-use interface built in Streamlit for analyzing policy documents - developed by GIZ Data and the Sustainable Development Solution Network. It uses a minimal keyword extraction technique that leverages multiple NLP embeddings and relies on [Transformers] (https://huggingface.co/transformers/) 🤗 to create keywords/keyphrases that are most similar to a document. """ ) st.markdown("") st.markdown("") st.markdown("## 📌 Step One: Upload document ")