Spaces:
Paused
Paused
Download src/search.py from phycomp/quantum-website: direct link, hf CLI and curl.
- Browser
- Download file 449 Bytes
-
https://huggingface.co/spaces/phycomp/quantum-website/resolve/main/src/search.py
- Command line
-
hf download hf://spaces/phycomp/quantum-website/src/search.py
-
curl -L -o search.py https://huggingface.co/spaces/phycomp/quantum-website/resolve/main/src/search.py
449 Bytes
| """搜尋模組:網頁搜尋 + 本地內容搜尋。""" | |
| import sys | |
| sys.path.insert(0, "/home/sam/quantum_website") | |
| from src.content_loader import search_content | |
| def web_search(query): | |
| """使用 websearch 工具的替代:回傳搜尋建議。""" | |
| # 本地內容搜尋 | |
| local = search_content(query) | |
| return {"query": query, "local_results": local, "web_results": []} | |
| def search_all(keyword): | |
| return search_content(keyword) | |