Spaces:
Runtime error
Runtime error
jeanpoll
commited on
Commit
·
c564c57
1
Parent(s):
5eb62f8
working version (hopefully)
Browse files- app.py +2 -2
- requirements.txt +1 -1
app.py
CHANGED
@@ -10,7 +10,7 @@ def print_highlighted_text(text, df_result, offset=0):
|
|
10 |
for match in iter_match:
|
11 |
word = match.string[start_pos:match.start()]
|
12 |
logging.debug(f"word '{word}' was found between {start_pos} and {match.start()}")
|
13 |
-
df_entity = df_result.query(f"{start_pos + offset}>=start & {
|
14 |
logging.debug(f"Found entites are: {df_entity}")
|
15 |
if len(df_entity) == 1:
|
16 |
entity = df_entity["entity"].values[0]
|
@@ -56,7 +56,7 @@ def display_email(text, part=1):
|
|
56 |
None, None, None, None
|
57 |
|
58 |
|
59 |
-
utils.f_setup_logger(level_sysout=logging.
|
60 |
|
61 |
|
62 |
iface = gradio.Interface(title="Parser of email",
|
|
|
10 |
for match in iter_match:
|
11 |
word = match.string[start_pos:match.start()]
|
12 |
logging.debug(f"word '{word}' was found between {start_pos} and {match.start()}")
|
13 |
+
df_entity = df_result.query(f"{start_pos + offset}>=start & {start_pos + offset}<=end").head(1)
|
14 |
logging.debug(f"Found entites are: {df_entity}")
|
15 |
if len(df_entity) == 1:
|
16 |
entity = df_entity["entity"].values[0]
|
|
|
56 |
None, None, None, None
|
57 |
|
58 |
|
59 |
+
utils.f_setup_logger(level_sysout=logging.INFO, level_file=logging.INFO, folder_path="logs")
|
60 |
|
61 |
|
62 |
iface = gradio.Interface(title="Parser of email",
|
requirements.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
langid==1.1.6
|
2 |
numpy
|
3 |
pandas
|
4 |
-
regex
|
5 |
scikit-learn==0.24.1
|
6 |
sentence-transformers==1.0.4
|
7 |
tensorflow==2.6.0
|
|
|
1 |
langid==1.1.6
|
2 |
numpy
|
3 |
pandas
|
4 |
+
regex
|
5 |
scikit-learn==0.24.1
|
6 |
sentence-transformers==1.0.4
|
7 |
tensorflow==2.6.0
|