| from transformers import pipeline | |
| extractor = pipeline("text2text-generation", model="datasetsANDmodels/location-extraction") | |
| intent = " I will visit you at botanic garden." | |
| label=extractor(intent)[0]["generated_text"] | |
| if label=="": | |
| label="No location detected" | |
| print (label ) |