import gradio as gr from transformers import pipeline def analyze_output(input_text): pipe = pipeline("text-classification", model="Titeiiko/OTIS-Official-Spam-Model") result = pipe(input_text)[0] if result["label"] == "LABEL_0": return f"Not Spam: {result['score']:.4f}" else: return f"Spam: {result['score']:.4f}" iface = gr.Interface( fn=analyze_output, inputs=gr.Textbox(), outputs="text", live=False, title="Spam Classification App", description="Enter a text to classify it as Spam or Not Spam.", theme="compact" ) iface.launch()