Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ import gradio as gr
|
|
8 |
from elasticsearch import Elasticsearch
|
9 |
from elasticsearch_dsl import Search, Q
|
10 |
|
11 |
-
es = Elasticsearch(os.environ.get("host"), timeout=100, http_compress=True, maxsize=1000)
|
12 |
-
|
13 |
def mark_tokens_bold(string, tokens):
|
14 |
for token in tokens:
|
15 |
pattern = re.escape(token) #r"\b" + re.escape(token) + r"\b"
|
|
|
8 |
from elasticsearch import Elasticsearch
|
9 |
from elasticsearch_dsl import Search, Q
|
10 |
|
11 |
+
# es = Elasticsearch(os.environ.get("host"), timeout=100, http_compress=True, maxsize=1000)
|
12 |
+
es = Elasticsearch(os.environ.get("host"), timeout=200)
|
13 |
def mark_tokens_bold(string, tokens):
|
14 |
for token in tokens:
|
15 |
pattern = re.escape(token) #r"\b" + re.escape(token) + r"\b"
|