Spaces:
Sleeping
Sleeping
Download utils/auth.py from ahmedumeraziz/PDFs_chat_bots: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/spaces/ahmedumeraziz/PDFs_chat_bots/resolve/main/utils/auth.py
- Command line
-
hf download hf://spaces/ahmedumeraziz/PDFs_chat_bots/utils/auth.py
-
curl -L -o auth.py https://huggingface.co/spaces/ahmedumeraziz/PDFs_chat_bots/resolve/main/utils/auth.py
388 Bytes
| import streamlit as st | |
| def setup_auth(): | |
| st.sidebar.title("🔐 Login") | |
| password = st.sidebar.text_input("Enter Access Password", type="password") | |
| if st.sidebar.button("Authenticate"): | |
| if password == "12345": # Change this! | |
| st.session_state.authenticated = True | |
| st.rerun() | |
| else: | |
| st.sidebar.error("Incorrect password") |