GabMartino
commited on
Commit
•
16c2f8d
1
Parent(s):
e3c0725
Some fixes.
Browse files- app.py +1 -1
- embedders/LatinBERT.py +0 -1
- requirements.txt +115 -0
app.py
CHANGED
@@ -13,7 +13,7 @@ models = dict(
|
|
13 |
LaBSE=LaBSE(),
|
14 |
LatinBERT=LatinBERT(bertPath="./embedders/latin_bert/latin_bert", tokenizerPath="./embedders/tokenizer/latin.subword.encoder")
|
15 |
)
|
16 |
-
verify_certs=
|
17 |
es = Elasticsearch(os.environ["ELASTIC_HOST"], basic_auth=os.environ["ELASTIC_AUTH"].split(":"), verify_certs=verify_certs)
|
18 |
|
19 |
|
|
|
13 |
LaBSE=LaBSE(),
|
14 |
LatinBERT=LatinBERT(bertPath="./embedders/latin_bert/latin_bert", tokenizerPath="./embedders/tokenizer/latin.subword.encoder")
|
15 |
)
|
16 |
+
verify_certs=True
|
17 |
es = Elasticsearch(os.environ["ELASTIC_HOST"], basic_auth=os.environ["ELASTIC_AUTH"].split(":"), verify_certs=verify_certs)
|
18 |
|
19 |
|
embedders/LatinBERT.py
CHANGED
@@ -25,7 +25,6 @@ class LatinBERT(nn.Module):
|
|
25 |
#tokens_ids = tokens_ids.to("cuda")
|
26 |
#tokens_ids = tokens_ids.squeeze()
|
27 |
if tokens_ids.shape[-1] > 512:
|
28 |
-
print(tokens_ids.shape)
|
29 |
tokens_ids = torch.narrow(tokens_ids, -1, 0, 512)
|
30 |
|
31 |
tokens_ids = tokens_ids.reshape((-1, tokens_ids.shape[-1]))
|
|
|
25 |
#tokens_ids = tokens_ids.to("cuda")
|
26 |
#tokens_ids = tokens_ids.squeeze()
|
27 |
if tokens_ids.shape[-1] > 512:
|
|
|
28 |
tokens_ids = torch.narrow(tokens_ids, -1, 0, 512)
|
29 |
|
30 |
tokens_ids = tokens_ids.reshape((-1, tokens_ids.shape[-1]))
|
requirements.txt
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
absl-py==0.12.0
|
2 |
+
ale-py==0.7.1
|
3 |
+
astunparse==1.6.3
|
4 |
+
bz2file==0.98
|
5 |
+
cached-property==1.5.2
|
6 |
+
cachetools==4.2.4
|
7 |
+
certifi==2022.12.7
|
8 |
+
charset-normalizer==2.0.12
|
9 |
+
chex==0.0.9
|
10 |
+
clang==5.0
|
11 |
+
click==8.0.4
|
12 |
+
cloudpickle==2.2.1
|
13 |
+
cycler==0.11.0
|
14 |
+
dataclasses==0.8
|
15 |
+
decorator==5.1.1
|
16 |
+
dill==0.3.4
|
17 |
+
dm-tree==0.1.8
|
18 |
+
dopamine-rl==3.2.1
|
19 |
+
elastic-transport==8.4.0
|
20 |
+
elasticsearch==8.6.2
|
21 |
+
filelock==3.4.1
|
22 |
+
Flask==2.0.3
|
23 |
+
flatbuffers==1.12
|
24 |
+
flax==0.3.5
|
25 |
+
future==0.18.3
|
26 |
+
gast==0.4.0
|
27 |
+
gevent==22.10.2
|
28 |
+
gin-config==0.5.0
|
29 |
+
google-api-core==2.8.2
|
30 |
+
google-api-python-client==2.52.0
|
31 |
+
google-auth==1.35.0
|
32 |
+
google-auth-httplib2==0.1.0
|
33 |
+
google-auth-oauthlib==0.4.6
|
34 |
+
google-pasta==0.2.0
|
35 |
+
googleapis-common-protos==1.56.3
|
36 |
+
greenlet==2.0.2
|
37 |
+
grpcio==1.48.2
|
38 |
+
gunicorn==20.1.0
|
39 |
+
gym==0.21.0
|
40 |
+
h5py==3.1.0
|
41 |
+
httplib2==0.22.0
|
42 |
+
huggingface-hub==0.4.0
|
43 |
+
idna==3.4
|
44 |
+
importlib-metadata==4.8.3
|
45 |
+
importlib-resources==5.4.0
|
46 |
+
itsdangerous==2.0.1
|
47 |
+
jax==0.2.17
|
48 |
+
jaxlib==0.1.69
|
49 |
+
Jinja2==3.0.3
|
50 |
+
joblib==1.1.1
|
51 |
+
keras==2.6.0
|
52 |
+
Keras-Preprocessing==1.1.2
|
53 |
+
kfac==0.2.0
|
54 |
+
kiwisolver==1.3.1
|
55 |
+
Markdown==3.3.7
|
56 |
+
MarkupSafe==2.0.1
|
57 |
+
matplotlib==3.3.4
|
58 |
+
mesh-tensorflow==0.1.21
|
59 |
+
mpmath==1.3.0
|
60 |
+
msgpack==1.0.5
|
61 |
+
numpy==1.19.5
|
62 |
+
oauth2client==4.1.3
|
63 |
+
oauthlib==3.2.2
|
64 |
+
opencv-python==4.7.0.72
|
65 |
+
opt-einsum==3.3.0
|
66 |
+
optax==0.0.9
|
67 |
+
packaging==21.3
|
68 |
+
pandas==1.1.5
|
69 |
+
Pillow==8.4.0
|
70 |
+
promise==2.3
|
71 |
+
protobuf==3.19.6
|
72 |
+
pyasn1==0.4.8
|
73 |
+
pyasn1-modules==0.2.8
|
74 |
+
pygame==2.3.0
|
75 |
+
pyparsing==3.0.9
|
76 |
+
pypng==0.20220715.0
|
77 |
+
python-dateutil==2.8.2
|
78 |
+
pytz==2023.3
|
79 |
+
PyYAML==6.0
|
80 |
+
regex==2022.10.31
|
81 |
+
requests==2.27.1
|
82 |
+
requests-oauthlib==1.3.1
|
83 |
+
rsa==4.9
|
84 |
+
sacremoses==0.0.53
|
85 |
+
scipy==1.5.4
|
86 |
+
six==1.15.0
|
87 |
+
sympy==1.9
|
88 |
+
tensor2tensor==1.15.7
|
89 |
+
tensorboard==2.6.0
|
90 |
+
tensorboard-data-server==0.6.1
|
91 |
+
tensorboard-plugin-wit==1.8.1
|
92 |
+
tensorflow==2.6.2
|
93 |
+
tensorflow-addons==0.14.0
|
94 |
+
tensorflow-datasets==4.5.2
|
95 |
+
tensorflow-estimator==2.6.0
|
96 |
+
tensorflow-gan==2.1.0
|
97 |
+
tensorflow-hub==0.13.0
|
98 |
+
tensorflow-metadata==1.2.0
|
99 |
+
tensorflow-probability==0.7.0
|
100 |
+
termcolor==1.1.0
|
101 |
+
tf-slim==1.1.0
|
102 |
+
tokenizers==0.12.1
|
103 |
+
toolz==0.12.0
|
104 |
+
torch==1.10.2
|
105 |
+
tqdm==4.64.1
|
106 |
+
transformers==4.18.0
|
107 |
+
typeguard==2.13.3
|
108 |
+
typing-extensions==3.7.4.3
|
109 |
+
uritemplate==4.1.1
|
110 |
+
urllib3==1.26.15
|
111 |
+
Werkzeug==2.0.3
|
112 |
+
wrapt==1.12.1
|
113 |
+
zipp==3.6.0
|
114 |
+
zope.event==4.6
|
115 |
+
zope.interface==5.5.2
|