This example shows how to use a pre-trained BART model for text classification.
python text_classification.py
You can then enter a text and the model will predict the country as label that best fits the text, e.g.:
- The GopherCon AU 2023 conference will be held in Sydney.
- Paris is celebrated around the world for its iconic Eiffel Tower and rich cultural heritage.
- The charming small town of Paris, Illinois, is known for its friendly community and tranquil rural landscapes.