File size: 720 Bytes
1bfd284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
29
30
31
32
import gradio as gr

def generate_website(name, description):
    # Simple HTML template generation
    html_code = f"""
    <!DOCTYPE html>
    <html>
    <head>
        <title>{name}</title>
    </head>
    <body>
        <h1>{name}</h1>
        <p>{description}</p>
    </body>
    </html>
    """
    return html_code

iface = gr.Interface(
    fn=generate_website,
    inputs=[
        gr.Textbox(label="Website Name"),
        gr.Textbox(label="Website Description"),
    ],
    outputs=gr.Textbox(label="Generated HTML Code"),
    title="AI Website Generator",
    description="Generate a simple HTML website with AI.",
    theme="macos",
    css=".gradio-container {background-color: #f0f0f0;}"
)

iface.launch()