Spaces:
Runtime error
Runtime error
Download app.py from hwangzhiming/SentimentClassification: direct link, hf CLI and curl.
- Browser
- Download file 287 Bytes
-
https://huggingface.co/spaces/hwangzhiming/SentimentClassification/resolve/2057779ec031829be0b45ede70a5f55480900905/app.py
- Command line
-
hf download hf://spaces/hwangzhiming/SentimentClassification@2057779ec031829be0b45ede70a5f55480900905/app.py
-
curl -L -o app.py https://huggingface.co/spaces/hwangzhiming/SentimentClassification/resolve/2057779ec031829be0b45ede70a5f55480900905/app.py
287 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| sentiment_analysis = pipeline("sentiment-analysis",model="siebert/sentiment-roberta-large-english") | |
| def greet(text): | |
| return sentiment_analysis(text); | |
| iface = gr.Interface(fn=greet, inputs="text", outputs="text") | |
| iface.launch() |