Spaces:
Runtime error
Runtime error
Download src/app.py from viswanani/GullyDRS.LBW.Predictorapp: direct link, hf CLI and curl.
- Browser
- Download file 262 Bytes
-
https://huggingface.co/spaces/viswanani/GullyDRS.LBW.Predictorapp/resolve/main/src/app.py
- Command line
-
hf download hf://spaces/viswanani/GullyDRS.LBW.Predictorapp/src/app.py
-
curl -L -o app.py https://huggingface.co/spaces/viswanani/GullyDRS.LBW.Predictorapp/resolve/main/src/app.py
262 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| clf = pipeline("sentiment-analysis", model="./outputs") | |
| def classify(text): | |
| return clf(text)[0]['label'] | |
| gr.Interface(fn=classify, inputs="text", outputs="text", title="Sentiment Classifier").launch() | |