Spaces:
Runtime error
Runtime error
Download app.py from mlizer/gradi_senti: direct link, hf CLI and curl.
- Browser
- Download file 352 Bytes
-
https://huggingface.co/spaces/mlizer/gradi_senti/resolve/main/app.py
- Command line
-
hf download hf://spaces/mlizer/gradi_senti/app.py
-
curl -L -o app.py https://huggingface.co/spaces/mlizer/gradi_senti/resolve/main/app.py
352 Bytes
| from transformers import pipeline | |
| import gradio as gr | |
| sentiment = pipeline('sentiment-analysis') | |
| def get_sentiment(input_text): | |
| return sentiment(input_text) | |
| result = get_sentiment("The movie was bad") | |
| iface = gr.Interface(fn = get_sentiment, inputs= 'text', outputs = ['text'], title = 'Sentiment Analysis') | |
| iface.launch(inline = False, share= True) |