import gradio as gr from transformers import pipeline model_name = "ieuniversity/flirty_classifier" classifier = pipeline("text-classification", model=model_name) def classify_text(text): output = classifier(text) label = output[0]["label"] score = output[0]["score"] return f"Label: {label}" gr.Interface(fn=classify_text, inputs="text", outputs="text", title="Flirty Classifier", description="Enter some text and get a prediction for whether it's flirty or not.").launch()