anujkarn commited on
Commit
b080eb5
·
1 Parent(s): 058aaa5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -20,7 +20,7 @@ from PIL import Image, UnidentifiedImageError
20
  from SPARQLWrapper import SPARQLWrapper, JSON, N3
21
  from fuzzywuzzy import process, fuzz
22
  from st_aggrid import GridOptionsBuilder, AgGrid, GridUpdateMode, DataReturnMode
23
-
24
 
25
  sparql = SPARQLWrapper('https://dbpedia.org/sparql')
26
 
@@ -49,9 +49,10 @@ Non-organised entities with entiities.json
49
  # Create empty dataframe to hold entity data for ease of processing
50
  self.entity_df = pd.DataFrame(columns=["entity", "description"])
51
  # Load the spacy model
52
- self.nlp = spacy.load('en_core_web_lg')
53
-
54
- print('___________self.nlp', self.nlp._path)
 
55
  # Parse the text
56
  self.entity_df = self.get_who_what_where_when()
57
  # Disambiguate entities
 
20
  from SPARQLWrapper import SPARQLWrapper, JSON, N3
21
  from fuzzywuzzy import process, fuzz
22
  from st_aggrid import GridOptionsBuilder, AgGrid, GridUpdateMode, DataReturnMode
23
+ from transformers import pipeline
24
 
25
  sparql = SPARQLWrapper('https://dbpedia.org/sparql')
26
 
 
49
  # Create empty dataframe to hold entity data for ease of processing
50
  self.entity_df = pd.DataFrame(columns=["entity", "description"])
51
  # Load the spacy model
52
+
53
+ # self.nlp = spacy.load('en_core_web_lg')
54
+ self.nlp = pipeline(model="spacy/en_core_web_lg")
55
+
56
  # Parse the text
57
  self.entity_df = self.get_who_what_where_when()
58
  # Disambiguate entities