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