Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,8 +48,11 @@ def download_spacy_model(model_name):
|
|
48 |
# return files_names[max_similarity_idx]
|
49 |
|
50 |
def find_closest(query):
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
53 |
files_names = []
|
54 |
files_vectors = []
|
55 |
|
|
|
48 |
# return files_names[max_similarity_idx]
|
49 |
|
50 |
def find_closest(query):
|
51 |
+
try:
|
52 |
+
nlp = spacy.load('en_core_web_md')
|
53 |
+
except:
|
54 |
+
download_spacy_model('en_core_web_md')
|
55 |
+
nlp = spacy.load('en_core_web_md')
|
56 |
files_names = []
|
57 |
files_vectors = []
|
58 |
|