Spaces:
Runtime error
Runtime error
Commit
•
ec3ff39
1
Parent(s):
c577811
UPDATE add.py to connect without secrets.toml
Browse files
app.py
CHANGED
@@ -7,8 +7,11 @@ st.set_page_config(
|
|
7 |
page_icon= plt.imread(os.path.abspath('static/logo.png')),
|
8 |
)
|
9 |
st.sidebar.title('DataBases')
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
cnx = get_connection(user=st.secrets.db_username, password=st.secrets.db_password, host=st.secrets.db_host)
|
12 |
|
13 |
if 'databases' not in st.session_state :
|
14 |
databases = [db[0] for db in get_database_names(cnx)]
|
|
|
7 |
page_icon= plt.imread(os.path.abspath('static/logo.png')),
|
8 |
)
|
9 |
st.sidebar.title('DataBases')
|
10 |
+
try :
|
11 |
+
cnx = get_connection(user=st.secrets.db_username, password=st.secrets.db_password, host=st.secrets.db_host)
|
12 |
+
except :
|
13 |
+
cnx = get_connection(user="sajjad_quera", password="P@ssword1401", host='193.105.234.23')
|
14 |
|
|
|
15 |
|
16 |
if 'databases' not in st.session_state :
|
17 |
databases = [db[0] for db in get_database_names(cnx)]
|