GabMartino commited on
Commit
e8f4770
1 Parent(s): 4d159ae

Retrying...

Browse files
app.py CHANGED
@@ -14,7 +14,10 @@ models = dict(
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
 
20
  def searchCloseSentence(document, startNumber, numCloseSentence=3):
@@ -128,6 +131,7 @@ def search():
128
  "source": f"cosineSimilarity(params.query_vector, '{embeddingType}') + 1.0",
129
  "params": {"query_vector": query_vector}
130
  }
 
131
  results = es.search(
132
  index='sentences',
133
  query={
@@ -140,7 +144,7 @@ def search():
140
  },
141
  size=limit
142
  )
143
-
144
  pretty_results = prepareResults(results)
145
  for res in pretty_results:
146
  results_placeholder.markdown(res)
 
14
  LatinBERT=LatinBERT(bertPath="./embedders/latin_bert/latin_bert", tokenizerPath="./embedders/tokenizer/latin.subword.encoder")
15
  )
16
  verify_certs=True
17
+
18
+ host = "https://elastic.galatolo.xyz:443" #os.environ["ELASTIC_HOST"]
19
+ user_pass = "elastic:MBBtcMmYjLAZaPxM"#os.environ["ELASTIC_AUTH"].split(":")
20
+ es = Elasticsearch(host, basic_auth=user_pass.split(":"), verify_certs=verify_certs)
21
 
22
 
23
  def searchCloseSentence(document, startNumber, numCloseSentence=3):
 
131
  "source": f"cosineSimilarity(params.query_vector, '{embeddingType}') + 1.0",
132
  "params": {"query_vector": query_vector}
133
  }
134
+ status_indicator.write(f"Preparing the script for search...")
135
  results = es.search(
136
  index='sentences',
137
  query={
 
144
  },
145
  size=limit
146
  )
147
+ status_indicator.write(f"Prettifying the results ...")
148
  pretty_results = prepareResults(results)
149
  for res in pretty_results:
150
  results_placeholder.markdown(res)
embedders/__pycache__/LatinBERT.cpython-36.pyc ADDED
Binary file (5.97 kB). View file
 
embedders/__pycache__/labse.cpython-36.pyc ADDED
Binary file (1.6 kB). View file
 
requirements.txt CHANGED
@@ -1,161 +1,6 @@
1
- absl-py==1.4.0
2
- ale-py==0.8.1
3
- altair==4.2.2
4
- antlr4-python3-runtime==4.9.3
5
- array-record==0.2.0
6
- astunparse==1.6.3
7
- attrs==22.2.0
8
- blinker==1.6
9
- bz2file==0.98
10
- cached-property==1.5.2
11
- cachetools==5.3.0
12
- certifi==2022.12.7
13
- charset-normalizer==3.1.0
14
- chex==0.1.7
15
- click==8.1.3
16
- cloudpickle==2.2.1
17
- cmake==3.26.1
18
- decorator==5.1.1
19
- dm-tree==0.1.8
20
- dopamine-rl==3.2.1
21
- elastic-transport==8.4.0
22
  elasticsearch==8.6.2
23
- emoji==2.2.0
24
- entrypoints==0.4
25
- etils==1.2.0
26
- filelock==3.10.7
27
- Flask==2.2.3
28
- flatbuffers==23.3.3
29
- flax==0.6.8
30
- future==0.18.3
31
- gast==0.4.0
32
- gevent==22.10.2
33
- gin-config==0.5.0
34
- gitdb==4.0.10
35
- GitPython==3.1.31
36
- google-api-core==2.11.0
37
- google-api-python-client==2.84.0
38
- google-auth==2.17.2
39
- google-auth-httplib2==0.1.0
40
- google-auth-oauthlib==1.0.0
41
- google-pasta==0.2.0
42
- googleapis-common-protos==1.59.0
43
- greenlet==2.0.2
44
- grpcio==1.53.0
45
- gunicorn==20.1.0
46
- gym==0.26.2
47
- gym-notices==0.0.8
48
- h5py==3.8.0
49
- httplib2==0.22.0
50
- huggingface-hub==0.13.3
51
- hydra-core==1.3.2
52
- idna==3.4
53
- importlib-metadata==6.1.0
54
- importlib-resources==5.12.0
55
- itsdangerous==2.1.2
56
- jax==0.4.8
57
- jaxlib==0.4.7
58
- Jinja2==3.1.2
59
- jsonschema==4.17.3
60
- keras==2.12.0
61
- kfac==0.2.0
62
- libclang==16.0.0
63
- lit==16.0.0
64
- Markdown==3.4.3
65
- markdown-it-py==2.2.0
66
- MarkupSafe==2.1.2
67
- mdurl==0.1.2
68
- mesh-tensorflow==0.1.21
69
- ml-dtypes==0.0.4
70
- mpmath==1.3.0
71
- msgpack==1.0.5
72
- nest-asyncio==1.5.6
73
- networkx==3.1
74
- numpy==1.23.5
75
- nvidia-cublas-cu11==11.10.3.66
76
- nvidia-cuda-cupti-cu11==11.7.101
77
- nvidia-cuda-nvrtc-cu11==11.7.99
78
- nvidia-cuda-runtime-cu11==11.7.99
79
- nvidia-cudnn-cu11==8.5.0.96
80
- nvidia-cufft-cu11==10.9.0.58
81
- nvidia-curand-cu11==10.2.10.91
82
- nvidia-cusolver-cu11==11.4.0.1
83
- nvidia-cusparse-cu11==11.7.4.91
84
- nvidia-nccl-cu11==2.14.3
85
- nvidia-nvtx-cu11==11.7.91
86
- oauth2client==4.1.3
87
- oauthlib==3.2.2
88
- omegaconf==2.3.0
89
- opencv-python==4.7.0.72
90
- opt-einsum==3.3.0
91
- optax==0.1.4
92
- orbax==0.1.7
93
- packaging==23.0
94
- pandas==1.5.3
95
- Pillow==9.5.0
96
- promise==2.3
97
- protobuf==3.20.3
98
- psutil==5.9.4
99
- pyarrow==11.0.0
100
- pyasn1==0.4.8
101
- pyasn1-modules==0.2.8
102
- pydeck==0.8.0
103
- pygame==2.3.0
104
- Pygments==2.14.0
105
- Pympler==1.0.1
106
- pyparsing==3.0.9
107
- pypng==0.20220715.0
108
- pyrsistent==0.19.3
109
- python-dateutil==2.8.2
110
- pytz==2023.3
111
- pytz-deprecation-shim==0.1.0.post0
112
- PyYAML==6.0
113
- regex==2023.3.23
114
- requests==2.28.2
115
- requests-oauthlib==1.3.1
116
- rich==13.3.3
117
- rsa==4.9
118
- scipy==1.10.1
119
- semver==3.0.0
120
- six==1.16.0
121
- smmap==5.0.0
122
- stanza==1.5.0
123
- streamlit==1.20.0
124
- sympy==1.11.1
125
  tensor2tensor==1.15.7
126
- tensorboard==2.12.1
127
- tensorboard-data-server==0.7.0
128
- tensorboard-plugin-wit==1.8.1
129
- tensorflow==2.12.0
130
- tensorflow-addons==0.19.0
131
- tensorflow-datasets==4.9.0
132
- tensorflow-estimator==2.12.0
133
- tensorflow-gan==2.1.0
134
- tensorflow-hub==0.13.0
135
- tensorflow-io-gcs-filesystem==0.32.0
136
- tensorflow-metadata==1.13.0
137
- tensorflow-probability==0.7.0
138
- tensorstore==0.1.35
139
- termcolor==2.2.0
140
- tf-slim==1.1.0
141
- tokenizers==0.13.3
142
- toml==0.10.2
143
- toolz==0.12.0
144
- torch==2.0.0
145
- tornado==6.2
146
- tqdm==4.65.0
147
- transformers==4.27.4
148
- triton==2.0.0
149
- typeguard==3.0.2
150
- typing_extensions==4.5.0
151
- tzdata==2023.3
152
- tzlocal==4.3
153
- uritemplate==4.1.1
154
- urllib3==1.26.15
155
- validators==0.20.0
156
- watchdog==3.0.0
157
- Werkzeug==2.2.3
158
- wrapt==1.14.1
159
- zipp==3.15.0
160
- zope.event==4.6
161
- zope.interface==6.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  elasticsearch==8.6.2
2
+ numpy==1.19.5
3
+ streamlit==1.10.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  tensor2tensor==1.15.7
5
+ torch==1.10.2
6
+ transformers==4.18.0