File size: 612 Bytes
1ecbd6e
59d8ead
1ecbd6e
59d8ead
1ecbd6e
 
 
 
 
0d5a69e
1ecbd6e
 
 
 
 
0d5a69e
1ecbd6e
a37a819
1ecbd6e
 
 
 
a37a819
0d5a69e
59d8ead
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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()