Spaces:
Build error
Build error
Download app.py from Cosmographics/Collabteam: direct link, hf CLI and curl.
- Browser
- Download file 863 Bytes
-
https://huggingface.co/spaces/Cosmographics/Collabteam/resolve/main/app.py
- Command line
-
hf download hf://spaces/Cosmographics/Collabteam/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Cosmographics/Collabteam/resolve/main/app.py
863 Bytes
| import streamlit as st | |
| st.title("Bienvenue sur Collabteam ๐") | |
| if "is_logged_in" not in st.session_state: | |
| st.session_state.is_logged_in = False | |
| if not st.session_state.is_logged_in: | |
| st.subheader("Connexion") | |
| email = st.text_input("Email") | |
| password = st.text_input("Mot de passe", type="password") | |
| if st.button("Se connecter"): | |
| if email == "admin@entreprise.fr" and password == "motdepasse123": | |
| st.session_state.is_logged_in = True | |
| st.session_state.role = "admin" | |
| elif email == "user@entreprise.fr" and password == "motdepasse123": | |
| st.session_state.is_logged_in = True | |
| st.session_state.role = "user" | |
| else: | |
| st.error("Identifiants incorrects") | |
| else: | |
| st.success(f"Bienvenue, {st.session_state.role} ! ๐") | |
| st.write("Le reste de l'app viendra ici.") |