IAMTFRMZA commited on
Commit
1f15159
·
verified ·
1 Parent(s): d6d68dd
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -14,14 +14,20 @@ from io import BytesIO
14
  st.set_page_config(page_title="Schlager ContractAi")
15
 
16
  # Authentication
17
- AUTHORIZED_USER = "[email protected]"
18
- AUTHORIZED_PASSWORD = "Pass.123"
 
 
 
 
19
 
20
  if "authenticated" not in st.session_state:
21
  st.session_state["authenticated"] = False
22
 
23
  def login():
24
- if st.session_state["email"] == AUTHORIZED_USER and st.session_state["password"] == AUTHORIZED_PASSWORD:
 
 
25
  st.session_state["authenticated"] = True
26
  else:
27
  st.error("Invalid email or password. Please try again.")
@@ -158,4 +164,4 @@ ASSISTANT_CONTRACT_ID = "asst_rd9h8PfYuOmHbkvOF3RTmVfn"
158
  ASSISTANT_TECHNICAL_ID = "asst_xizNZBCJuy4TqdjqjwkxbAki"
159
 
160
  contract_chat_section(tab1, ASSISTANT_CONTRACT_ID, "contract_messages", "contract_input")
161
- contract_chat_section(tab2, ASSISTANT_TECHNICAL_ID, "technical_messages", "technical_input")
 
14
  st.set_page_config(page_title="Schlager ContractAi")
15
 
16
  # Authentication
17
+ AUTHORIZED_USERS = {
18
+ "[email protected]": "Pass.123",
19
+ "[email protected]": "Pass.123",
20
+ "[email protected]": "Pass.123",
21
+ "[email protected]": "Pass.123"
22
+ }
23
 
24
  if "authenticated" not in st.session_state:
25
  st.session_state["authenticated"] = False
26
 
27
  def login():
28
+ email = st.session_state.get("email", "")
29
+ password = st.session_state.get("password", "")
30
+ if email in AUTHORIZED_USERS and AUTHORIZED_USERS[email] == password:
31
  st.session_state["authenticated"] = True
32
  else:
33
  st.error("Invalid email or password. Please try again.")
 
164
  ASSISTANT_TECHNICAL_ID = "asst_xizNZBCJuy4TqdjqjwkxbAki"
165
 
166
  contract_chat_section(tab1, ASSISTANT_CONTRACT_ID, "contract_messages", "contract_input")
167
+ contract_chat_section(tab2, ASSISTANT_TECHNICAL_ID, "technical_messages", "technical_input")