prashant
commited on
Commit
•
3b97e90
1
Parent(s):
78f3ebc
spacy error fix
Browse files- requirements.txt +2 -2
- utils/search.py +1 -1
requirements.txt
CHANGED
@@ -11,7 +11,7 @@ pdfplumber==0.6.2
|
|
11 |
Pillow==9.1.1
|
12 |
seaborn==0.11.2
|
13 |
transformers==4.21.2
|
14 |
-
st-annotated-text
|
15 |
-
markdown
|
16 |
python-docx
|
17 |
streamlit_option_menu
|
|
|
11 |
Pillow==9.1.1
|
12 |
seaborn==0.11.2
|
13 |
transformers==4.21.2
|
14 |
+
st-annotated-text==3.0.0
|
15 |
+
markdown==3.4.1
|
16 |
python-docx
|
17 |
streamlit_option_menu
|
utils/search.py
CHANGED
@@ -109,7 +109,7 @@ def searchAnnotator(matches: List[List[int]], document):
|
|
109 |
for match in matches:
|
110 |
start_idx = match[0]
|
111 |
end_idx = match[1]
|
112 |
-
annotated_text = annotated_text + document[start:start_idx] + str(annotation(body=document[start_idx:end_idx], label="ANSWER", background="#964448", color='#ffffff'))
|
113 |
start = end_idx
|
114 |
|
115 |
st.write(
|
|
|
109 |
for match in matches:
|
110 |
start_idx = match[0]
|
111 |
end_idx = match[1]
|
112 |
+
annotated_text = annotated_text + document[start:start_idx].text + str(annotation(body=document[start_idx:end_idx].text, label="ANSWER", background="#964448", color='#ffffff'))
|
113 |
start = end_idx
|
114 |
|
115 |
st.write(
|