Spaces:
Runtime error
Runtime error
| 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() | |