Spaces:
Runtime error
Runtime error
| # PDF 智能問答系統 - 依賴套件清單 | |
| # 基於 Gemini 2.0 Flash 的 RAG 技術 | |
| # ===== 核心框架 ===== | |
| gradio>=4.0.0 # Web 介面框架 | |
| langchain>=0.1.0 # LangChain 核心 | |
| langchain-community>=0.0.20 # LangChain 社群擴展 | |
| langchain-google-genai>=1.0.0 # Google Gemini 整合 | |
| langchain-text-splitters | |
| # ===== Google AI 服務 ===== | |
| #google-generativeai>=0.3.0 # Google Gemini API | |
| google-genai | |
| # ===== PDF 處理 ===== | |
| PyPDF2>=3.0.0 # PDF 文字提取 | |
| # ===== 向量資料庫 ===== | |
| faiss-cpu>=1.7.4 # FAISS 向量搜尋 (CPU 版本) | |
| # faiss-gpu>=1.7.4 # 如果使用 GPU,請取消註解此行並註解上行 | |
| # ===== 文檔處理 ===== | |
| python-docx>=0.8.11 # Word 文檔生成 | |
| # ===== 環境和配置 ===== | |
| python-dotenv>=1.0.0 # 環境變數管理 | |
| # ===== 數值計算和文字處理 ===== | |
| numpy>=1.24.0 # 數值計算 | |
| tiktoken>=0.5.0 # OpenAI tokenizer | |
| # ===== HTTP 和網路 ===== | |
| requests>=2.31.0 # HTTP 請求 | |
| # ===== 工具和輔助 ===== | |
| tqdm>=4.65.0 # 進度條 | |
| pydantic>=2.0.0 # 資料驗證 | |
| # ===== 可選增強套件 ===== | |
| # 如果需要更強的 PDF 處理能力,可以選擇以下之一: | |
| # pymupdf>=1.23.0 # MuPDF Python 綁定,處理能力更強 | |
| # pdfplumber>=0.9.0 # 另一個 PDF 處理選項 | |
| # 如果需要更好的文字嵌入: | |
| # sentence-transformers>=2.2.0 # 更好的嵌入模型 | |
| # 如果需要更好的文字分割: | |
| # spacy>=3.7.0 # 自然語言處理 | |
| # nltk>=3.8.0 # 自然語言工具包 | |
| # ===== 開發工具 (可選) ===== | |
| # pytest>=7.4.0 # 測試框架 | |
| # black>=23.0.0 # 程式碼格式化 | |
| # flake8>=6.0.0 # 程式碼檢查 | |
| # jupyter>=1.0.0 # Jupyter notebook | |
| # ===== 系統需求 ===== | |
| # Python >= 3.8 | |
| # 建議使用 Python 3.9 或更高版本 | |
| # 記憶體建議 8GB 以上 | |
| # 硬碟空間建議 2GB 以上用於模型和索引 |