# app.py | |
import gradio as gr | |
# Custom function to return HTML output | |
def custom_html_output(input_text): | |
return { | |
"html": f"<div style='color: blue; border: 1px solid black; padding: 10px;'>Your input was: {input_text}</div>" | |
} | |
# Description with custom HTML | |
description_content = """ | |
<b>Welcome to our Gradio App!</b><br> | |
For more details, check out our <a href="https://www.example.com" target="_blank">website</a>. | |
""" | |
# Gradio interface | |
iface = gr.Interface( | |
fn=custom_html_output, | |
inputs="text", | |
outputs={"html": "html"}, | |
description=description_content | |
) | |
iface.launch() |