Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +1 -1
src/streamlit_app.py
CHANGED
|
@@ -299,7 +299,7 @@ with st.sidebar:
|
|
| 299 |
|
| 300 |
# --- 初始化 Hugging Face LLM Client (已更新,MODEL_ID 作為參數) ---
|
| 301 |
# 確保 load_inference_client 接受 model_id 作為參數,以利用 Streamlit 的快取機制。
|
| 302 |
-
@st.cache_resource
|
| 303 |
def load_inference_client(model_id):
|
| 304 |
if not os.environ.get("HF_TOKEN"): return None
|
| 305 |
try:
|
|
|
|
| 299 |
|
| 300 |
# --- 初始化 Hugging Face LLM Client (已更新,MODEL_ID 作為參數) ---
|
| 301 |
# 確保 load_inference_client 接受 model_id 作為參數,以利用 Streamlit 的快取機制。
|
| 302 |
+
@st.cache_resource
|
| 303 |
def load_inference_client(model_id):
|
| 304 |
if not os.environ.get("HF_TOKEN"): return None
|
| 305 |
try:
|