Spaces:
Sleeping
Sleeping
Download app.py from DJSTUDIO/derjaAI1-test1: direct link, hf CLI and curl.
- Browser
- Download file 544 Bytes
-
https://huggingface.co/spaces/DJSTUDIO/derjaAI1-test1/resolve/main/app.py
- Command line
-
hf download hf://spaces/DJSTUDIO/derjaAI1-test1/app.py
-
curl -L -o app.py https://huggingface.co/spaces/DJSTUDIO/derjaAI1-test1/resolve/main/app.py
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}% | |
| -------------------- | |
| """) |