Junaidb commited on
Commit
9eff8c1
·
verified ·
1 Parent(s): cf15bc1

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +1 -41
ui.py CHANGED
@@ -1,7 +1,7 @@
1
  import streamlit as st
2
  import requests
3
  import os
4
- from auth import authenticator
5
 
6
  tok=os.getenv("TOK")
7
 
@@ -22,47 +22,7 @@ def InitSession():
22
 
23
  InitSession()
24
 
25
- name, auth_status, username = authenticator.login('main', fields={'Form name': 'Login'})
26
 
27
- try:
28
- registration_success = authenticator.register_user("main")
29
- except Exception as e:
30
- registration_success = False
31
- st.error(f"Registration error: {e}")
32
-
33
-
34
-
35
-
36
- base_option_map = {
37
-
38
- 0: ":material/login:",
39
- 1: ":material/personadd:",
40
-
41
- }
42
-
43
- selection = st.pills(
44
- "ACCESS",
45
- options=base_option_map.keys(),
46
- format_func=lambda option: base_option_map[option],
47
- selection_mode="single",
48
- )
49
- if selection==0:
50
-
51
-
52
- if auth_status:
53
-
54
-
55
- SHOWTABS()
56
-
57
- elif auth_status==False:
58
- st.write("login failed , try again")
59
-
60
- if selection==1:
61
- try:
62
- if authenticator.register_user('Register'):
63
- st.success("User registered successfully!")
64
- except Exception as e:
65
- st.error(e)
66
 
67
 
68
 
 
1
  import streamlit as st
2
  import requests
3
  import os
4
+ #from auth import authenticator
5
 
6
  tok=os.getenv("TOK")
7
 
 
22
 
23
  InitSession()
24
 
 
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
 
28