Project_Demo / app.py
Al-Chan's picture
Update app.py
167a426 verified
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()