Skip to content

[Name Entity Recognition] Webapp: OSError: [E050] Can't find model 'fr'. #117

@idrissbachali

Description

@idrissbachali

When i run app.py with french spacy ,i got this result

python app.py
Traceback (most recent call last):
File "app.py", line 7, in
nlp = spacy.load('fr')
File "C:\Users\IBL\AppData\Local\Programs\Python\Python37-32\lib\site-packages\spacy_init_.py", line 21, in load
return util.load_model(name, **overrides)
File "C:\Users\IBL\AppData\Local\Programs\Python\Python37-32\lib\site-packages\spacy\util.py", line 119, in load_model
raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'fr'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

i don't understand where is the error !!

i m running within python this command line
import spacy
from flask import request
from spacy import displacy

nlp = spacy.load('fr_core_news_md')

@app.route('/run_NER')
def run_NER():
text = request.args.get('input', '')

doc = nlp(text)

html = displacy.render(doc, style='ent', page=False)
return json.dumps(html)

so,i can't reach localhost !!please help me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions