| # Use a pipeline as a high-level helper | |
| from transformers import pipeline | |
| pipe = pipeline("text-classification", model="ProsusAI/finbert") | |
| # Texto de ejemplo | |
| texto = "The company's stock price increased by 5% after the quarterly earnings report." | |
| # Usamos el pipeline para clasificar el texto | |
| resultado = pipe(texto) | |
| # Mostramos el resultado | |
| print(resultado) |