Spaces:
Sleeping
Sleeping
Download app.py from duvr/sentiment_analysis: direct link, hf CLI and curl.
- Browser
- Download file 590 Bytes
-
https://huggingface.co/spaces/duvr/sentiment_analysis/resolve/main/app.py
- Command line
-
hf download hf://spaces/duvr/sentiment_analysis/app.py
-
curl -L -o app.py https://huggingface.co/spaces/duvr/sentiment_analysis/resolve/main/app.py
590 Bytes
| import gradio as gr | |
| from src.config import langs, models | |
| from src.predict import predict | |
| with gr.Blocks() as demo: | |
| gr.Markdown("# Análisis de Sentimientos") | |
| # Mostrar el lenguaje y modelo en la misma línea | |
| with gr.Row(): | |
| lang = gr.Radio(choices=langs, label="Lang", value=langs[0]) | |
| model = gr.Dropdown(choices=models, label="Model", interactive=True) | |
| text = gr.Textbox(label="Input") | |
| output = gr.Label(label="Output") | |
| predict_btn = gr.Button("Predict") | |
| predict_btn.click(fn=predict, inputs=[lang, model, text], outputs=output) | |
| demo.launch() | |