Spaces:
Runtime error
Runtime error
Download example1.py from ucd-fs/sentiment-analysis: direct link, hf CLI and curl.
- Browser
- Download file 239 Bytes
-
https://huggingface.co/spaces/ucd-fs/sentiment-analysis/resolve/main/example1.py
- Command line
-
hf download hf://spaces/ucd-fs/sentiment-analysis/example1.py
-
curl -L -o example1.py https://huggingface.co/spaces/ucd-fs/sentiment-analysis/resolve/main/example1.py
239 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:") | |
| st.write(classifier(text)) |