Spaces:
Build error
Build error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +8 -0
src/streamlit_app.py
CHANGED
|
@@ -13,7 +13,15 @@ st.set_page_config(
|
|
| 13 |
page_icon="📊",
|
| 14 |
layout="wide"
|
| 15 |
)
|
|
|
|
|
|
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# 設定 Gemini API 金鑰
|
| 18 |
@st.cache_resource
|
| 19 |
def setup_genai():
|
|
|
|
| 13 |
page_icon="📊",
|
| 14 |
layout="wide"
|
| 15 |
)
|
| 16 |
+
# 建立 .streamlit 目錄
|
| 17 |
+
mkdir -p .streamlit
|
| 18 |
|
| 19 |
+
# 創建 secrets.toml 文件
|
| 20 |
+
cat > .streamlit/secrets.toml << EOL
|
| 21 |
+
GOOGLE_API_KEY = "AIzaSyBxrwdxgs6JemK25piF_RFnxJ9SqKuqhEE"
|
| 22 |
+
EOL
|
| 23 |
+
|
| 24 |
+
echo "已建立 .streamlit/secrets.toml 檔案"
|
| 25 |
# 設定 Gemini API 金鑰
|
| 26 |
@st.cache_resource
|
| 27 |
def setup_genai():
|