Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
import gradio as gr | |
classifier = pipeline("text-classification", model="Al-Chan/Malicious_Prompt_Classifier") | |
def text(text): | |
return classifier(text)[0]['label'] | |
demo = gr.Interface( | |
fn=text, | |
inputs=["text"], | |
outputs=["text"], | |
) | |