Spaces:
Sleeping
Sleeping
Commit
·
ce5befa
1
Parent(s):
790d71a
Update app.py
Browse files
app.py
CHANGED
@@ -314,8 +314,8 @@ 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 |
-
ner_biobert = models['ner_pipeline']
|
318 |
-
query_entities = extract_entities(query
|
319 |
print(f"Extracted Query Entities: {query_entities}")
|
320 |
for doc_id, doc_text in enumerate(document_texts):
|
321 |
sentences = nltk.sent_tokenize(doc_text) # Split document into sentences
|
|
|
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)
|
319 |
print(f"Extracted Query Entities: {query_entities}")
|
320 |
for doc_id, doc_text in enumerate(document_texts):
|
321 |
sentences = nltk.sent_tokenize(doc_text) # Split document into sentences
|