awacke1 commited on
Commit
debdc34
β€’
1 Parent(s): 0df8b02

Update backup1.app.py

Browse files
Files changed (1) hide show
  1. backup1.app.py +4 -2
backup1.app.py CHANGED
@@ -9,6 +9,7 @@ SUBSCRIPTION_ID = "003fba60-5b3f-48f4-ab36-3ed11bc40816"
9
  # You'll need to set these environment variables or use Azure Key Vault
10
  DATABASE_NAME = os.environ.get("COSMOS_DATABASE_NAME")
11
  CONTAINER_NAME = os.environ.get("COSMOS_CONTAINER_NAME")
 
12
 
13
  def insert_record(record):
14
  try:
@@ -26,7 +27,8 @@ if 'logged_in' not in st.session_state:
26
 
27
  if not st.session_state.logged_in:
28
  st.subheader("πŸ” Login")
29
- input_key = st.text_input("Enter your Cosmos DB Primary Key", type="password")
 
30
  if st.button("πŸš€ Login"):
31
  if input_key:
32
  st.session_state.primary_key = input_key
@@ -66,7 +68,7 @@ else:
66
  # Logout button
67
  if st.button("πŸšͺ Logout"):
68
  st.session_state.logged_in = False
69
- st.experimental_rerun()
70
 
71
  # Display connection info
72
  st.sidebar.subheader("πŸ”— Connection Information")
 
9
  # You'll need to set these environment variables or use Azure Key Vault
10
  DATABASE_NAME = os.environ.get("COSMOS_DATABASE_NAME")
11
  CONTAINER_NAME = os.environ.get("COSMOS_CONTAINER_NAME")
12
+ Key = os.environ.get("Key")
13
 
14
  def insert_record(record):
15
  try:
 
27
 
28
  if not st.session_state.logged_in:
29
  st.subheader("πŸ” Login")
30
+ #input_key = st.text_input("Enter your Cosmos DB Primary Key", type="password")
31
+ input_key = Key
32
  if st.button("πŸš€ Login"):
33
  if input_key:
34
  st.session_state.primary_key = input_key
 
68
  # Logout button
69
  if st.button("πŸšͺ Logout"):
70
  st.session_state.logged_in = False
71
+ st.rerun()
72
 
73
  # Display connection info
74
  st.sidebar.subheader("πŸ”— Connection Information")