| from transformers import pipeline | |
| extractor = pipeline("text2text-generation", model=".") | |
| import pandas as pd | |
| df = pd.read_csv("message.csv") | |
| texts=df["message"] | |
| for intent in texts: | |
| label=extractor(intent)[0]["generated_text"] | |
| if label=="": | |
| label="No message detected" | |
| print (label ) | |