Song commited on
Commit
aa4568e
·
1 Parent(s): 4368e1d
Files changed (2) hide show
  1. app.py +1 -0
  2. requirements.txt +7 -19
app.py CHANGED
@@ -25,6 +25,7 @@ import logging
25
  import json
26
  import textwrap
27
  import time
 
28
  from typing import List, Dict, Any, Optional, Tuple, Union
29
  from functools import lru_cache
30
  from dataclasses import dataclass, field
 
25
  import json
26
  import textwrap
27
  import time
28
+ import tenacity
29
  from typing import List, Dict, Any, Optional, Tuple, Union
30
  from functools import lru_cache
31
  from dataclasses import dataclass, field
requirements.txt CHANGED
@@ -1,25 +1,13 @@
1
- # Web server
2
- fastapi
3
- uvicorn[standard]
4
- python-multipart
5
- requests # 用於 LINE reply
6
-
7
- # NLP / RAG
8
  numpy
9
  pandas
 
 
10
  jieba
11
  rank-bm25
12
- fuzzywuzzy
13
- python-Levenshtein
14
-
15
- # 向量索引與嵌入
16
  faiss-cpu
17
- sentence-transformers==3.0.1
18
- torch --extra-index-url https://download.pytorch.org/whl/cpu
19
- torchvision
20
- torchaudio
21
-
22
- # LLM 連接與穩定性
23
  openai
24
- litellm
25
- tenacity # 用於 API 重試
 
 
 
 
 
 
 
 
1
  numpy
2
  pandas
3
+ fastapi
4
+ uvicorn
5
  jieba
6
  rank-bm25
7
+ sentence-transformers
8
+ # 根據您的硬體選擇一個,若有 NVIDIA GPU 請使用 faiss-gpu,否則使用 faiss-cpu
 
 
9
  faiss-cpu
10
+ torch
 
 
 
 
 
11
  openai
12
+ tenacity
13
+ requests