Download app.py from geoffhorowitz/sentiment_analysis_basic: direct link, hf CLI and curl.
- Browser
- Download file 181 Bytes
-
https://huggingface.co/spaces/geoffhorowitz/sentiment_analysis_basic/resolve/main/app.py
- Command line
-
hf download hf://spaces/geoffhorowitz/sentiment_analysis_basic/app.py
-
curl -L -o app.py https://huggingface.co/spaces/geoffhorowitz/sentiment_analysis_basic/resolve/main/app.py
181 Bytes
| import streamlit as st | |
| from transformers import pipeline | |
| pip = pipeline('sentiment-analysis') | |
| text = st.text_area('enter some text!') | |
| if text: | |
| out = pip(text) | |
| st.json(out) |