Spaces:
Sleeping
Sleeping
Commit
·
4c78737
1
Parent(s):
4f13d60
Update app.py
Browse files
app.py
CHANGED
@@ -326,7 +326,7 @@ def extract_relevant_portions(document_texts, query, max_portions=3, portion_siz
|
|
326 |
print(f"Document {doc_id} Entities: {doc_entities}")
|
327 |
for i, sentence in enumerate(sentences):
|
328 |
# Extract entities from the sentence
|
329 |
-
sentence_entities = extract_entities(sentence
|
330 |
# Compute relevance score
|
331 |
relevance_score = match_entities(query_entities, sentence_entities)
|
332 |
# Select sentences with at least `min_query_words` matching entities
|
|
|
326 |
print(f"Document {doc_id} Entities: {doc_entities}")
|
327 |
for i, sentence in enumerate(sentences):
|
328 |
# Extract entities from the sentence
|
329 |
+
sentence_entities = extract_entities(sentence)
|
330 |
# Compute relevance score
|
331 |
relevance_score = match_entities(query_entities, sentence_entities)
|
332 |
# Select sentences with at least `min_query_words` matching entities
|