Gradio is a Python library for creating interactive web apps that share and demonstrate machine-learning applications. It connects model functions to browser-based inputs and outputs. section 5.4 section 5.4.3
A Gradio interface specifies:
- The function to run on submitted inputs through the fn argument. section 5.4.3
- Input components and formats, such as a Textbox for email text, with configurable properties including max_lines. section 5.4.3
- Output components, titles, and descriptions that shape the web application experience. section 5.4.3
- A local launch address and port, such as 0.0.0.0:8082; setting share=True can create a public link. section 5.4.3
PhiDeL phishing detector
A Gradio Interface connects prepare_answer to a multiline email Textbox and a text output labeled “Is this phishing?”. Running it on port 8082 provides a browser app that returns a phishing decision with an explanation. section 5.4.3
iface = gr.Interface(
fn=prepare_answer,
inputs =[
gr. Textbox(label=" Paste text (email) here", max_lines=100),
],
outputs=[
gr.Textbox(label="Is this phishing?"),
],
title="PhiDeL",
description="Phishing Detection using LLM"
)
The interface listing shows how a model-facing function, Textbox input, Textbox output, title, and description become a Gradio application. section 5.4.3



