Update app.py
Browse files
app.py
CHANGED
@@ -41,6 +41,8 @@ labels=pipe([dict(text=selected_sentence1,
|
|
41 |
text_pair=selected_sentence2)])
|
42 |
|
43 |
|
|
|
|
|
44 |
|
45 |
def extract_person_names(sentence):
|
46 |
"""
|
@@ -53,7 +55,7 @@ def extract_person_names(sentence):
|
|
53 |
list: List of person names extracted from the sentence.
|
54 |
"""
|
55 |
# Load English language model
|
56 |
-
nlp =
|
57 |
|
58 |
# Process the sentence using spaCy
|
59 |
doc = nlp(sentence)
|
|
|
41 |
text_pair=selected_sentence2)])
|
42 |
|
43 |
|
44 |
+
import en_core_web_sm
|
45 |
+
|
46 |
|
47 |
def extract_person_names(sentence):
|
48 |
"""
|
|
|
55 |
list: List of person names extracted from the sentence.
|
56 |
"""
|
57 |
# Load English language model
|
58 |
+
nlp = en_core_web_sm.load()
|
59 |
|
60 |
# Process the sentence using spaCy
|
61 |
doc = nlp(sentence)
|