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