Update app.py
Browse files
app.py
CHANGED
@@ -19,22 +19,22 @@ st.write(f"Thinc version: {thinc.__version__}")
|
|
19 |
|
20 |
from modules.syntax_analysis import highlight_repeated_words, get_repeated_words_colors, POS_COLORS, POS_TRANSLATIONS, visualize_syntax
|
21 |
|
22 |
-
#@st.cache_resource
|
23 |
-
#def load_spacy_model():
|
24 |
-
# return spacy.load("es_core_news_lg")
|
25 |
-
|
26 |
@st.cache_resource
|
27 |
def load_spacy_model():
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
nlp = spacy.load("es_core_news_lg")
|
34 |
-
|
|
|
|
|
|
|
|
|
35 |
|
36 |
# Load spaCy model
|
37 |
-
nlp = spacy.load("
|
38 |
|
39 |
# Configure the page to use the full width
|
40 |
st.set_page_config(layout="wide", page_title="AIdeaText")
|
|
|
19 |
|
20 |
from modules.syntax_analysis import highlight_repeated_words, get_repeated_words_colors, POS_COLORS, POS_TRANSLATIONS, visualize_syntax
|
21 |
|
|
|
|
|
|
|
|
|
22 |
@st.cache_resource
|
23 |
def load_spacy_model():
|
24 |
+
return spacy.load("es_core_news_lg")
|
25 |
+
|
26 |
+
#@st.cache_resource
|
27 |
+
#def load_spacy_model():
|
28 |
+
# try:
|
29 |
+
# nlp = spacy.load("es_core_news_lg")
|
30 |
+
# except IOError:
|
31 |
+
# st.info("Downloading spaCy model...")
|
32 |
+
# spacy.cli.download("es_core_news_lg")
|
33 |
+
# nlp = spacy.load("es_core_news_lg")
|
34 |
+
# return nlp
|
35 |
|
36 |
# Load spaCy model
|
37 |
+
nlp = spacy.load("es_core_news_lg")
|
38 |
|
39 |
# Configure the page to use the full width
|
40 |
st.set_page_config(layout="wide", page_title="AIdeaText")
|