feat: LLM 论文图书馆 — 初始提交

- FastAPI 后端: REST API + Bearer Token 鉴权 + PDF 代理
- 180 篇论文数据 (data/papers.json): 9 模块、32 子领域
- 前端: 数据驱动、卡片径向渐变光效、PDF 页面内阅读
- 底部状态栏: arXiv/HF 连通性检测
- PDF 加载: arXiv 优先(5s超时) → HK 本地兜底
- Docker 化部署 (Dockerfile + start.sh + nginx.conf)
- arXiv + HF 批量下载器 (api/downloader.py)
This commit is contained in:
2026-06-02 10:25:14 +00:00
commit f0ff62e082
21 changed files with 4042 additions and 0 deletions

13
api/check_trans.py Normal file
View File

@@ -0,0 +1,13 @@
import urllib.request, json
r = urllib.request.urlopen("http://127.0.0.1:8000/api/translate/2005.14165")
data = json.loads(r.read())
p = data["paragraphs"][0]
page1 = p["page"]
en1 = p["en"][:60]
zh1 = p["zh"][:80]
print(f"page={page1}, en={en1}")
print(f"zh={zh1}")
p5 = data["paragraphs"][5]
page5 = p5["page"]
zh5 = p5["zh"][:80]
print(f"para[5] page={page5}, zh={zh5}")