Spaces:
Runtime error
Runtime error
File size: 384 Bytes
8bc8977 |
1 2 3 4 5 6 7 8 9 10 11 12 |
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()
|