viiceclo / app.py
Doubleupai's picture
Create app.py
1bfd284 verified
raw
history blame
720 Bytes
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()