Spaces:
Runtime error
Runtime error
Download app.py from pmarrone1331/PSpace: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/spaces/pmarrone1331/PSpace/resolve/main/app.py
- Command line
-
hf download hf://spaces/pmarrone1331/PSpace/app.py
-
curl -L -o app.py https://huggingface.co/spaces/pmarrone1331/PSpace/resolve/main/app.py
384 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| # Cargar el modelo desde Hugging Face Hub | |
| modelo = pipeline("text-classification", model="pmarrone1331/modelo_programa_seguridad") | |
| def predecir(texto): | |
| resultado = modelo(texto) | |
| return resultado[0]['label'] | |
| gr.Interface(fn=predecir, inputs="text", outputs="text", title="Clasificador de Seguridad").launch() | |