paulwong888 commited on
Commit
62288ab
·
verified ·
1 Parent(s): 5fe3976

Upload sidebar.py

Browse files
Files changed (1) hide show
  1. sidebar.py +20 -0
sidebar.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ def display_sidebar():
4
+ with st.sidebar:
5
+ openai_api_key = st.text_input("請輸入OpenAI API金鑰: ", type="password")
6
+ st.markdown("[獲取OpenAi API金鑰](https://platform.openai.com/account/api-key)")
7
+ return openai_api_key
8
+
9
+ def remove_button():
10
+ # Add custom CSS to hide the GitHub icon
11
+ st.markdown(
12
+ r"""
13
+ <style>
14
+ #MainMenu {visibility: hidden;}
15
+ [data-testid="stActionButton"] {visibility: hidden;}
16
+ footer {visibility: hidden;}
17
+ </style>
18
+ """,
19
+ unsafe_allow_html=True
20
+ )