Download app.py from nowaff/testt: direct link, hf CLI and curl.
- Browser
- Download file 352 Bytes
-
https://huggingface.co/spaces/nowaff/testt/resolve/30609348cc94de92f2dd406e54b2459cec203e2d/app.py
- Command line
-
hf download hf://spaces/nowaff/testt@30609348cc94de92f2dd406e54b2459cec203e2d/app.py
-
curl -L -o app.py https://huggingface.co/spaces/nowaff/testt/resolve/30609348cc94de92f2dd406e54b2459cec203e2d/app.py
352 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| pipe = pipeline("text-classification", model="CAMeL-Lab/bert-base-arabic-camelbert-mix-sentiment") | |
| def analyze(text): | |
| result = pipe(text) | |
| return result | |
| demo = gr.Interface(fn=analyze, | |
| inputs="text", | |
| outputs="text") | |
| demo.launch(debug=True) |