Zekun Wu
commited on
Commit
β’
8bed6d7
1
Parent(s):
d9d0ab9
update
Browse files
app.py
CHANGED
@@ -1,41 +1,15 @@
|
|
1 |
import streamlit as st
|
2 |
-
import os
|
3 |
|
4 |
-
# Set up the page configuration and initial display
|
5 |
st.set_page_config(
|
6 |
-
page_title="
|
7 |
-
page_icon="
|
8 |
)
|
9 |
|
|
|
10 |
|
11 |
-
|
12 |
-
"""Function to verify the entered password."""
|
13 |
-
# Check if the password is already verified
|
14 |
-
if 'password_verified' in st.session_state and st.session_state['password_verified']:
|
15 |
-
return True
|
16 |
-
# Password input field in the sidebar with a submit button
|
17 |
-
with st.sidebar:
|
18 |
-
password_input = st.text_input("Enter Password:", type="password")
|
19 |
-
if st.button('Submit'):
|
20 |
-
if password_input == os.getenv('PASSWORD'):
|
21 |
-
st.session_state['password_verified'] = True
|
22 |
-
st.experimental_rerun() # Rerun the app with the updated state
|
23 |
-
else:
|
24 |
-
st.error("Incorrect Password, please try again.")
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
st.sidebar.success("Select a demo above.")
|
31 |
-
st.markdown("""
|
32 |
-
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.
|
33 |
-
|
34 |
-
Please use the sidebar to navigate through different demonstrations once you have access.
|
35 |
-
""")
|
36 |
-
|
37 |
-
|
38 |
-
# Entry point for the app
|
39 |
-
if __name__ == '__main__':
|
40 |
-
if check_password():
|
41 |
-
main() # Load the main app if the password is verified
|
|
|
1 |
import streamlit as st
|
|
|
2 |
|
|
|
3 |
st.set_page_config(
|
4 |
+
page_title="app",
|
5 |
+
page_icon="π",
|
6 |
)
|
7 |
|
8 |
+
st.title('AI explainability in the EU AI Act: a case for an NLE approach towards pragmatic explanations')
|
9 |
|
10 |
+
st.sidebar.success("Select a demo above.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
+
st.markdown(
|
13 |
+
"""
|
14 |
+
"""
|
15 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|