derjaAI1-test1 / app.py
DJSTUDIO's picture
app
3f92fe4 verified
raw
history blame contribute delete
544 Bytes
# 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}%
--------------------
""")