Spaces:
Sleeping
Sleeping
File size: 544 Bytes
3f92fe4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 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}%
--------------------
""") |