Spaces:
Sleeping
Sleeping
| # Use a pipeline as a high-level helper | |
| from transformers import pipeline | |
| pipe = pipeline("text-classification", model="DJSTUDIO/autotrain-pvdof-cqtp8") | |
| while 1: | |
| int = input("TALK TO -- OM IL 5IR -- >>>> ") | |
| int_ = str(int) | |
| int_1 = int_.lower() | |
| int_0 = pipe(str(int_1)) | |
| label = None | |
| percent = None | |
| for i in int_0: | |
| label = i["label"] | |
| percent = i["score"]*100 | |
| print(f""" | |
| ------ REPONSE ------ | |
| reponse : {label} | |
| pourcentage : {percent}% | |
| -------------------- | |
| """) |