Spaces:
Runtime error

ChatBot / country.py
Kavi11's picture
build
9a25058
Raw History Blame Contribute Delete
190 Bytes
import spacy
nlp = spacy.load("en_core_web_sm")
utterance = "Hello visit to Wadala"
doc = nlp(utterance)
country = [ent.text for ent in doc.ents if ent.label_ == "GPE"]
print(country[0])