Spaces:
Runtime error
Runtime error
Download app.py from DavidFernandes/Sentiment-Analysis: direct link, hf CLI and curl.
- Browser
- Download file 370 Bytes
-
https://huggingface.co/spaces/DavidFernandes/Sentiment-Analysis/resolve/main/app.py
- Command line
-
hf download hf://spaces/DavidFernandes/Sentiment-Analysis/app.py
-
curl -L -o app.py https://huggingface.co/spaces/DavidFernandes/Sentiment-Analysis/resolve/main/app.py
370 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| david = pipeline('sentiment-analysis') | |
| def get_senti(input_text): | |
| result = david(input_text) | |
| return result[0]["label"] | |
| iface=gr.Interface(fn=get_senti, | |
| inputs="text", | |
| outputs=['text'], | |
| title="David's Sentiment Analysis" ) | |
| iface.launch(inline=False) |