Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,16 @@ import pandas as pd
|
|
4 |
from docx import Document
|
5 |
from io import BytesIO
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Cargar el modelo de SpaCy en espa帽ol
|
8 |
-
nlp = spacy.load('
|
9 |
|
10 |
# Funci贸n para extraer nombres de personas
|
11 |
def extract_names_from_docx(docx_file):
|
|
|
4 |
from docx import Document
|
5 |
from io import BytesIO
|
6 |
|
7 |
+
import subprocess
|
8 |
+
|
9 |
+
# Comando a ejecutar
|
10 |
+
command = ['python', '-m', 'spacy', 'download', 'es_core_news_trf']
|
11 |
+
|
12 |
+
# Ejecutar el comando
|
13 |
+
subprocess.run(command, check=True, text=True, capture_output=False)
|
14 |
+
|
15 |
# Cargar el modelo de SpaCy en espa帽ol
|
16 |
+
nlp = spacy.load('es_core_news_trf')
|
17 |
|
18 |
# Funci贸n para extraer nombres de personas
|
19 |
def extract_names_from_docx(docx_file):
|