Download app.py from emre-kocyigit/dark-pattern-classification: direct link, hf CLI and curl.
- Browser
- Download file 306 Bytes
-
https://huggingface.co/spaces/emre-kocyigit/dark-pattern-classification/resolve/main/app.py
- Command line
-
hf download hf://spaces/emre-kocyigit/dark-pattern-classification/app.py
-
curl -L -o app.py https://huggingface.co/spaces/emre-kocyigit/dark-pattern-classification/resolve/main/app.py
306 Bytes
| from transformers import pipeline | |
| import streamlit as st | |
| classifier = pipeline("zero-shot-classification", | |
| model="facebook/bart-large-mnli") | |
| text = st.text_area('Enter the text') | |
| candidate_labels = ['complex', 'ambiguity', 'conflicting', 'tricky'] | |
| classifier(text, candidate_labels) |