|
import streamlit as st |
|
import os |
|
|
|
|
|
st.set_page_config( |
|
page_title="AI Explainability Demo", |
|
page_icon="π" |
|
) |
|
|
|
|
|
def check_password(): |
|
"""Function to verify the entered password.""" |
|
|
|
if 'password_verified' in st.session_state and st.session_state['password_verified']: |
|
return True |
|
|
|
with st.sidebar: |
|
password_input = st.text_input("Enter Password:", type="password") |
|
if st.button('Submit'): |
|
if password_input == os.getenv('PASSWORD'): |
|
st.session_state['password_verified'] = True |
|
st.experimental_rerun() |
|
else: |
|
st.error("Incorrect Password, please try again.") |
|
|
|
|
|
|
|
def main(): |
|
st.title('AI Explainability in the EU AI Act: a Case for an NLE Approach Towards Pragmatic Explanations') |
|
st.sidebar.success("Select a demo above.") |
|
st.markdown(""" |
|
Welcome to the AI explainability demonstration. This application showcases how Natural Language Explanations (NLE) can be used to provide clear and understandable explanations, which are crucial under the EU AI Act. |
|
|
|
Please use the sidebar to navigate through different demonstrations once you have access. |
|
""") |
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
if check_password(): |
|
main() |
|
|