import requests import streamlit as st; import app_utils as util st.set_page_config(page_title="sandl", page_icon="🩴", layout="wide", initial_sidebar_state="collapsed") # goes to login page if not logged in try: set = st.session_state['username'] except: util.switch_page('app') # position: relative; st.markdown(""" """, unsafe_allow_html=True) profilecol1, profilecol2, profilecol3 = st.columns([1, 8, 1]) with profilecol1: # goes to prompt page if st.button('◀ Back'): util.switch_page('query') with profilecol2: # pfp st.write('') st.markdown("
", unsafe_allow_html=True) st.header(st.session_state['username'], divider='gray', anchor=False) st.write("") if st.button('Show API Key'): # gets the api key res = requests.post("https://sandl-backend-ny3lmzb4dq-uc.a.run.app/get_api_keys", json={"jwt": st.session_state['userdata']}) # # test code # print(res.status_code) apikey = res.json()["keys"][0] st.text(apikey) st.write('') if st.button('Logout'): util.switch_page('app')