Spaces:
Sleeping
Sleeping
Commit
·
fa5fd77
1
Parent(s):
7a3a393
Update app.py
Browse files
app.py
CHANGED
|
@@ -314,6 +314,7 @@ def match_entities(query_entities, sentence_entities):
|
|
| 314 |
def extract_relevant_portions(document_texts, query, max_portions=3, portion_size=1, min_query_words=1):
|
| 315 |
relevant_portions = {}
|
| 316 |
# Extract entities from the query
|
|
|
|
| 317 |
query_entities = extract_entities(query, ner_biobert)
|
| 318 |
print(f"Extracted Query Entities: {query_entities}")
|
| 319 |
for doc_id, doc_text in enumerate(document_texts):
|
|
|
|
| 314 |
def extract_relevant_portions(document_texts, query, max_portions=3, portion_size=1, min_query_words=1):
|
| 315 |
relevant_portions = {}
|
| 316 |
# Extract entities from the query
|
| 317 |
+
ner_biobert = models['ner_pipeline']
|
| 318 |
query_entities = extract_entities(query, ner_biobert)
|
| 319 |
print(f"Extracted Query Entities: {query_entities}")
|
| 320 |
for doc_id, doc_text in enumerate(document_texts):
|