Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,18 @@ preprocessed_text = preprocess_text(bhagavad_gita_text)
|
|
41 |
import spacy
|
42 |
|
43 |
# Load a spaCy model for English language processing
|
44 |
-
nlp = spacy.load("en_core_web_sm")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
def extractive_qa(question, text):
|
47 |
"""
|
|
|
41 |
import spacy
|
42 |
|
43 |
# Load a spaCy model for English language processing
|
44 |
+
# nlp = spacy.load("en_core_web_sm")
|
45 |
+
|
46 |
+
# import spacy
|
47 |
+
|
48 |
+
try:
|
49 |
+
nlp = spacy.load("en_core_web_sm")
|
50 |
+
except OSError:
|
51 |
+
print("Downloading en_core_web_sm model...")
|
52 |
+
!python -m spacy download en_core_web_sm
|
53 |
+
nlp = spacy.load("en_core_web_sm")
|
54 |
+
|
55 |
+
|
56 |
|
57 |
def extractive_qa(question, text):
|
58 |
"""
|