|
Download DEPLOYMENT_GUIDE.md from ark945/checkWeb: direct link, hf CLI and curl.
- Browser
- Download file 2.07 kB
-
https://huggingface.co/spaces/ark945/checkWeb/resolve/main/DEPLOYMENT_GUIDE.md
- Command line
-
hf download hf://spaces/ark945/checkWeb/DEPLOYMENT_GUIDE.md
-
curl -L -o DEPLOYMENT_GUIDE.md https://huggingface.co/spaces/ark945/checkWeb/resolve/main/DEPLOYMENT_GUIDE.md
2.07 kB
A newer version of the Streamlit SDK is available: 1.68.0
網站狀態監控工具 - 部署指南
應用程式功能
- 狀態檢查: 自動檢查網站 HTTP 狀態與回應時間
- 網頁截圖: 使用 Playwright 對每個網站進行截圖
- CSV 報告: 匯出檢測結果為 CSV
- Word 報告: 匯出包含截圖的完整 Word 報告
🚀 部署到 Hugging Face Spaces
方法一:透過 Git 直接推送(推薦)
# 1. 新增 Hugging Face 為遠端儲存庫(首次設定)
git remote add hf https://huggingface.co/spaces/ark945/checkWeb
# 2. 推送到 Hugging Face
git push hf main
# 3. 如果推送被拒絕(歷史紀錄不同),使用強制推送
git push hf main --force
方法二:同時推送到 GitHub 與 Hugging Face
# 推送到 GitHub
git push origin main
# 推送到 Hugging Face
git push hf main
方法三:手動上傳
- 前往 https://huggingface.co/spaces/ark945/checkWeb
- 點選上方的 Files 標籤
- 點選 Add file → Upload files
- 上傳以下檔案:
app.pyrequirements.txtpackages.txturlList.txtREADME.md.gitattributes
- 點擊 Commit changes to main
注意事項
packages.txt和requirements.txt必須使用 LF 換行格式(不可使用 Windows 的 CRLF),否則 Linux 環境會讀取錯誤。專案中的.gitattributes已自動處理此問題。- Hugging Face 會根據
README.md中的sdk_version自動安裝 Streamlit,因此requirements.txt中不需要包含streamlit。
🔧 常見問題
| 問題 | 解決方式 |
|---|---|
| 截圖中文亂碼 (□) | packages.txt 已包含 fonts-noto-cjk |
| 時間差 8 小時 | 程式已設定台灣時區 (UTC+8) |
| Build error: Unable to locate package | 確認 .gitattributes 已上傳,強制 LF 換行 |
| Runtime error: Could not resolve host | 點擊 Space 的「Restart this Space」重啟 |
| Failed to fetch module | 按 Ctrl+Shift+R 強制重新整理瀏覽器快取 |