Spaces:
Sleeping
Sleeping
orionweller
commited on
Commit
•
b1fe7a3
1
Parent(s):
0c3e233
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ from collections import defaultdict
|
|
6 |
import json
|
7 |
import copy
|
8 |
import plotly.express as px
|
|
|
9 |
|
10 |
from dataset_loading import load_local_qrels, load_local_corpus, load_local_queries
|
11 |
|
@@ -168,6 +169,10 @@ if corpus is not None and queries is not None and qrels is not None:
|
|
168 |
# relevant
|
169 |
relevant_docs = list(qrels[str(inst_num)].keys())[:n_relevant_docs]
|
170 |
doc_texts = [(doc_id, corpus[doc_id]["title"] if "title" in corpus[doc_id] else "", corpus[doc_id]["text"]) for doc_id in relevant_docs]
|
|
|
|
|
|
|
|
|
171 |
container.subheader(f"Relevant Documents ({len(list(qrels[str(inst_num)].keys()))})")
|
172 |
current_checkboxes = []
|
173 |
for (docid, title, text) in doc_texts:
|
|
|
6 |
import json
|
7 |
import copy
|
8 |
import plotly.express as px
|
9 |
+
from find_splitting_words import find_dividing_words
|
10 |
|
11 |
from dataset_loading import load_local_qrels, load_local_corpus, load_local_queries
|
12 |
|
|
|
169 |
# relevant
|
170 |
relevant_docs = list(qrels[str(inst_num)].keys())[:n_relevant_docs]
|
171 |
doc_texts = [(doc_id, corpus[doc_id]["title"] if "title" in corpus[doc_id] else "", corpus[doc_id]["text"]) for doc_id in relevant_docs]
|
172 |
+
splitting_words = find_dividing_words(relevant_docs_text)
|
173 |
+
|
174 |
+
st.markdown(splitting_words)
|
175 |
+
|
176 |
container.subheader(f"Relevant Documents ({len(list(qrels[str(inst_num)].keys()))})")
|
177 |
current_checkboxes = []
|
178 |
for (docid, title, text) in doc_texts:
|