Spaces:
Sleeping
Sleeping
File size: 329 Bytes
f6be78e 167a426 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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"],
)
if __name__ == "__main__":
demo.launch()
|