Spaces:
Sleeping
Sleeping
Adrian Cowham
commited on
Commit
•
a2644bf
1
Parent(s):
28ea5c5
update requirements.txt
Browse files- requirements.txt +68 -134
- src/core/embedding.py +1 -1
requirements.txt
CHANGED
@@ -1,185 +1,119 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
aiohttp==3.8.4
|
4 |
aiosignal==1.3.1
|
5 |
altair==5.0.1
|
6 |
annotated-types==0.5.0
|
7 |
anyio==3.7.1
|
8 |
-
|
9 |
-
appnope==0.1.3
|
10 |
-
asgiref==3.6.0
|
11 |
-
asttokens==2.2.1
|
12 |
-
async-timeout==4.0.2
|
13 |
attrs==23.1.0
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
charset-normalizer==3.1.0
|
22 |
-
click==8.1.6
|
23 |
-
comm==0.1.3
|
24 |
-
contourpy==1.0.7
|
25 |
-
cryptography==40.0.2
|
26 |
cycler==0.11.0
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
dj-rest-auth==3.0.0
|
34 |
-
Django==4.2
|
35 |
-
django-allauth==0.54.0
|
36 |
-
django-cors-headers==3.14.0
|
37 |
-
django-generic-json-views==0.8
|
38 |
-
django-random-id-model==0.1.1
|
39 |
-
django-rest-framework==0.1.0
|
40 |
-
djangorestframework==3.14.0
|
41 |
-
djangorestframework-simplejwt==5.2.2
|
42 |
-
docopt==0.6.2
|
43 |
-
exceptiongroup==1.1.2
|
44 |
-
executing==1.2.0
|
45 |
-
fastapi==0.101.0
|
46 |
ffmpy==0.3.1
|
47 |
filelock==3.12.2
|
48 |
-
|
49 |
-
|
50 |
-
frozenlist==1.
|
51 |
-
fsspec==2023.
|
52 |
future==0.18.3
|
53 |
-
|
54 |
-
|
55 |
-
google-api-python-client==2.86.0
|
56 |
-
google-auth==2.18.0
|
57 |
-
google-auth-httplib2==0.1.0
|
58 |
-
google-auth-oauthlib==1.0.0
|
59 |
-
google-cloud-core==2.3.2
|
60 |
-
google-cloud-storage==2.9.0
|
61 |
-
google-crc32c==1.5.0
|
62 |
-
google-resumable-media==2.5.0
|
63 |
-
googleapis-common-protos==1.59.0
|
64 |
-
gradio==3.39.0
|
65 |
-
gradio_client==0.3.0
|
66 |
-
gunicorn==20.1.0
|
67 |
h11==0.14.0
|
68 |
httpcore==0.17.3
|
69 |
httplib2==0.22.0
|
70 |
httpx==0.24.1
|
71 |
huggingface-hub==0.16.4
|
72 |
idna==3.4
|
73 |
-
importlib-
|
74 |
-
|
75 |
-
|
76 |
-
ipython==8.14.0
|
77 |
-
iso8601==2.0.0
|
78 |
-
jedi==0.18.2
|
79 |
Jinja2==3.1.2
|
80 |
-
joblib==1.2
|
81 |
-
jsonschema==4.
|
82 |
jsonschema-specifications==2023.7.1
|
83 |
-
jupyter_client==8.3.0
|
84 |
-
jupyter_core==5.3.1
|
85 |
kiwisolver==1.4.4
|
|
|
|
|
86 |
linkify-it-py==2.0.2
|
87 |
-
|
|
|
88 |
markdown-it-py==2.2.0
|
89 |
MarkupSafe==2.1.3
|
90 |
-
|
91 |
-
matplotlib
|
92 |
mdit-py-plugins==0.3.3
|
93 |
mdurl==0.1.2
|
94 |
mpmath==1.3.0
|
95 |
multidict==6.0.4
|
96 |
-
multiprocess==0.70.15
|
97 |
-
munch==2.5.0
|
98 |
mypy-extensions==1.0.0
|
99 |
-
nest-asyncio==1.5.6
|
100 |
networkx==3.1
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
105 |
packaging==23.1
|
106 |
-
pandas==2.0.
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
pipreqs==0.4.13
|
114 |
-
platformdirs==3.9.1
|
115 |
-
plotly==5.14.1
|
116 |
-
prompt-toolkit==3.0.39
|
117 |
-
protobuf==4.23.0
|
118 |
-
psutil==5.9.5
|
119 |
-
psycopg==3.1.8
|
120 |
-
psycopg2==2.9.6
|
121 |
-
ptyprocess==0.7.0
|
122 |
-
pure-eval==0.2.2
|
123 |
-
pyarrow==12.0.1
|
124 |
-
pyasn1==0.5.0
|
125 |
-
pyasn1-modules==0.3.0
|
126 |
-
pycparser==2.21
|
127 |
-
pydantic==2.1.1
|
128 |
-
pydantic_core==2.4.0
|
129 |
pydub==0.25.1
|
130 |
-
|
131 |
-
PyJWT==2.6.0
|
132 |
pyparsing==3.0.9
|
133 |
-
pyserial==3.5
|
134 |
python-dateutil==2.8.2
|
135 |
python-multipart==0.0.6
|
136 |
-
python3-openid==3.2.0
|
137 |
pytz==2023.3
|
|
|
138 |
PyYAML==6.0.1
|
139 |
-
|
|
|
140 |
referencing==0.30.2
|
141 |
-
regex==2023.
|
142 |
-
requests==2.
|
143 |
-
requests-oauthlib==1.3.1
|
144 |
-
rest-framework-simplejwt==0.0.2
|
145 |
rpds-py==0.9.2
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
scipy==1.10.1
|
150 |
semantic-version==2.10.0
|
|
|
151 |
sentencepiece==0.1.99
|
152 |
-
|
153 |
-
|
154 |
sniffio==1.3.0
|
155 |
-
|
156 |
-
sqlparse==0.4.4
|
157 |
-
stack-data==0.6.2
|
158 |
starlette==0.27.0
|
159 |
sympy==1.12
|
160 |
-
tenacity==8.2.
|
161 |
-
|
162 |
-
threadpoolctl==3.1.0
|
163 |
tiktoken==0.4.0
|
164 |
-
tokenize-rt==5.2.0
|
165 |
tokenizers==0.13.3
|
166 |
-
tomli==2.0.1
|
167 |
toolz==0.12.0
|
168 |
torch==2.0.1
|
169 |
-
|
170 |
-
tqdm==4.
|
171 |
-
|
172 |
transformers==4.31.0
|
|
|
173 |
typing_extensions==4.7.1
|
174 |
tzdata==2023.3
|
175 |
uc-micro-py==1.0.2
|
176 |
-
|
177 |
-
urllib3==1.26.15
|
178 |
uvicorn==0.23.2
|
179 |
-
wcwidth==0.2.6
|
180 |
websockets==11.0.3
|
181 |
-
|
182 |
-
xxhash==3.3.0
|
183 |
-
yarg==0.1.9
|
184 |
-
yarl==1.8.2
|
185 |
-
zipp==3.15.0
|
|
|
1 |
+
aiofiles==23.2.1
|
2 |
+
aiohttp==3.8.5
|
|
|
3 |
aiosignal==1.3.1
|
4 |
altair==5.0.1
|
5 |
annotated-types==0.5.0
|
6 |
anyio==3.7.1
|
7 |
+
async-timeout==4.0.3
|
|
|
|
|
|
|
|
|
8 |
attrs==23.1.0
|
9 |
+
certifi==2023.7.22
|
10 |
+
charset-normalizer==3.2.0
|
11 |
+
ci-info==0.3.0
|
12 |
+
click==8.1.7
|
13 |
+
configobj==5.0.8
|
14 |
+
configparser==6.0.0
|
15 |
+
contourpy==1.1.0
|
|
|
|
|
|
|
|
|
|
|
16 |
cycler==0.11.0
|
17 |
+
dataclasses-json==0.5.14
|
18 |
+
docx2txt==0.8
|
19 |
+
etelemetry==0.3.0
|
20 |
+
exceptiongroup==1.1.3
|
21 |
+
faiss-cpu==1.7.4
|
22 |
+
fastapi==0.101.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
ffmpy==0.3.1
|
24 |
filelock==3.12.2
|
25 |
+
fonttools==4.42.0
|
26 |
+
frontend==0.0.3
|
27 |
+
frozenlist==1.4.0
|
28 |
+
fsspec==2023.6.0
|
29 |
future==0.18.3
|
30 |
+
gradio==3.40.1
|
31 |
+
gradio_client==0.4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
h11==0.14.0
|
33 |
httpcore==0.17.3
|
34 |
httplib2==0.22.0
|
35 |
httpx==0.24.1
|
36 |
huggingface-hub==0.16.4
|
37 |
idna==3.4
|
38 |
+
importlib-resources==6.0.1
|
39 |
+
isodate==0.6.1
|
40 |
+
itsdangerous==2.1.2
|
|
|
|
|
|
|
41 |
Jinja2==3.1.2
|
42 |
+
joblib==1.3.2
|
43 |
+
jsonschema==4.19.0
|
44 |
jsonschema-specifications==2023.7.1
|
|
|
|
|
45 |
kiwisolver==1.4.4
|
46 |
+
langchain==0.0.268
|
47 |
+
langsmith==0.0.24
|
48 |
linkify-it-py==2.0.2
|
49 |
+
looseversion==1.3.0
|
50 |
+
lxml==4.9.3
|
51 |
markdown-it-py==2.2.0
|
52 |
MarkupSafe==2.1.3
|
53 |
+
marshmallow==3.20.1
|
54 |
+
matplotlib==3.7.2
|
55 |
mdit-py-plugins==0.3.3
|
56 |
mdurl==0.1.2
|
57 |
mpmath==1.3.0
|
58 |
multidict==6.0.4
|
|
|
|
|
59 |
mypy-extensions==1.0.0
|
|
|
60 |
networkx==3.1
|
61 |
+
nibabel==5.1.0
|
62 |
+
nipype==1.8.6
|
63 |
+
nltk==3.8.1
|
64 |
+
numexpr==2.8.5
|
65 |
+
numpy==1.25.2
|
66 |
+
openai==0.27.8
|
67 |
+
orjson==3.9.5
|
68 |
packaging==23.1
|
69 |
+
pandas==2.0.3
|
70 |
+
pathlib==1.0.1
|
71 |
+
Pillow==10.0.0
|
72 |
+
prov==2.0.0
|
73 |
+
pydantic==2.2.1
|
74 |
+
pydantic_core==2.6.1
|
75 |
+
pydot==1.4.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
pydub==0.25.1
|
77 |
+
PyMuPDF==1.22.5
|
|
|
78 |
pyparsing==3.0.9
|
|
|
79 |
python-dateutil==2.8.2
|
80 |
python-multipart==0.0.6
|
|
|
81 |
pytz==2023.3
|
82 |
+
pyxnat==1.6
|
83 |
PyYAML==6.0.1
|
84 |
+
rank-bm25==0.2.2
|
85 |
+
rdflib==7.0.0
|
86 |
referencing==0.30.2
|
87 |
+
regex==2023.8.8
|
88 |
+
requests==2.31.0
|
|
|
|
|
89 |
rpds-py==0.9.2
|
90 |
+
safetensors==0.3.2
|
91 |
+
scikit-learn==1.3.0
|
92 |
+
scipy==1.11.2
|
|
|
93 |
semantic-version==2.10.0
|
94 |
+
sentence-transformers==2.2.2
|
95 |
sentencepiece==0.1.99
|
96 |
+
simplejson==3.19.1
|
97 |
+
six==1.16.0
|
98 |
sniffio==1.3.0
|
99 |
+
SQLAlchemy==2.0.20
|
|
|
|
|
100 |
starlette==0.27.0
|
101 |
sympy==1.12
|
102 |
+
tenacity==8.2.3
|
103 |
+
threadpoolctl==3.2.0
|
|
|
104 |
tiktoken==0.4.0
|
|
|
105 |
tokenizers==0.13.3
|
|
|
106 |
toolz==0.12.0
|
107 |
torch==2.0.1
|
108 |
+
torchvision==0.15.2
|
109 |
+
tqdm==4.66.1
|
110 |
+
traits==6.3.2
|
111 |
transformers==4.31.0
|
112 |
+
typing-inspect==0.9.0
|
113 |
typing_extensions==4.7.1
|
114 |
tzdata==2023.3
|
115 |
uc-micro-py==1.0.2
|
116 |
+
urllib3==2.0.4
|
|
|
117 |
uvicorn==0.23.2
|
|
|
118 |
websockets==11.0.3
|
119 |
+
yarl==1.9.2
|
|
|
|
|
|
|
|
src/core/embedding.py
CHANGED
@@ -51,7 +51,7 @@ def embed_files(
|
|
51 |
files: List[File], embedding: str, vector_store: str, **kwargs
|
52 |
) -> FolderIndex:
|
53 |
model_name = "BAAI/bge-small-en"
|
54 |
-
model_kwargs = {'device': '
|
55 |
encode_kwargs = {'normalize_embeddings': True} # set True to compute cosine similarity
|
56 |
model_norm = HuggingFaceBgeEmbeddings(
|
57 |
model_name=model_name,
|
|
|
51 |
files: List[File], embedding: str, vector_store: str, **kwargs
|
52 |
) -> FolderIndex:
|
53 |
model_name = "BAAI/bge-small-en"
|
54 |
+
model_kwargs = {'device': 'cpu'}
|
55 |
encode_kwargs = {'normalize_embeddings': True} # set True to compute cosine similarity
|
56 |
model_norm = HuggingFaceBgeEmbeddings(
|
57 |
model_name=model_name,
|