Spaces:
Runtime error
Runtime error
Download Sentiment_Analyzer_app.py from pavankumarhm/Sentiment_Analyzer: direct link, hf CLI and curl.
- Browser
- Download file 342 Bytes
-
https://huggingface.co/spaces/pavankumarhm/Sentiment_Analyzer/resolve/main/Sentiment_Analyzer_app.py
- Command line
-
hf download hf://spaces/pavankumarhm/Sentiment_Analyzer/Sentiment_Analyzer_app.py
-
curl -L -o Sentiment_Analyzer_app.py https://huggingface.co/spaces/pavankumarhm/Sentiment_Analyzer/resolve/main/Sentiment_Analyzer_app.py
342 Bytes
| from transformers import pipeline | |
| classifier = pipeline("sentiment-analysis") | |
| def func(utterance): | |
| return classifier(utterance) | |
| import gradio as gr | |
| descriptions = "Enter a text and get the sentiment prediction." | |
| app = gr.Interface(fn=func, inputs="text", outputs="text", title="Sentiment Analayzer", description=descriptions) | |
| app.launch() | |