Spaces:
Sleeping
Sleeping
File size: 1,062 Bytes
983d072 5b30198 9ce81f8 5b30198 |
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 33 34 35 36 37 38 39 40 41 42 43 44 45 |
import gradio as gr
# Load the RunwayML model using Gradio
model = gr.load("models/runwayml/stable-diffusion-v1-5")
# Custom HTML and CSS for styling
custom_html = """
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
text-align: center;
margin: 0;
padding: 0;
}
.container {
max-width: 600px;
margin: auto;
padding: 20px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin-top: 50px;
}
h1 {
color: #333;
}
</style>
</head>
<body>
<div class="container">
<h1>Stable Diffusion Model</h1>
{input}
{output}
</div>
</body>
</html>
"""
# Launch the interface with the loaded model and custom styling
iface = gr.Interface(fn=model, inputs=model.interface.inputs, outputs=model.interface.outputs)
iface.share(html=custom_html) |