Download country.py from Kavi11/ChatBot: direct link, hf CLI and curl.
- Browser
- Download file 190 Bytes
-
https://huggingface.co/spaces/Kavi11/ChatBot/resolve/main/country.py
- Command line
-
hf download hf://spaces/Kavi11/ChatBot/country.py
-
curl -L -o country.py https://huggingface.co/spaces/Kavi11/ChatBot/resolve/main/country.py
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]) |