Download app.py from madani/space1: direct link, hf CLI and curl.
- Browser
- Download file 259 Bytes
-
https://huggingface.co/spaces/madani/space1/resolve/main/app.py
- Command line
-
hf download hf://spaces/madani/space1/app.py
-
curl -L -o app.py https://huggingface.co/spaces/madani/space1/resolve/main/app.py
259 Bytes
| import streamlit as st | |
| from transformers import pipeline | |
| model="distilbert-base-uncased-finetuned-sst-2-english" | |
| classifier = pipeline("sentiment-analysis", model=model) | |
| text = st.text_input("Input a text:") | |
| if st.button("OK"): | |
| st.write(classifier(text)) |