chokiproai commited on
Commit
9ce81f8
1 Parent(s): 9a06e73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +42 -1
app.py CHANGED
@@ -1,3 +1,44 @@
1
  import gradio as gr
2
 
3
- gr.load("models/runwayml/stable-diffusion-v1-5").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ # Load and launch the RunwayML model using Gradio
4
+ iface = gr.Interface.load("models/runwayml/stable-diffusion-v1-5")
5
+
6
+ # Custom HTML and CSS for styling
7
+ custom_html = """
8
+ <!DOCTYPE html>
9
+ <html>
10
+ <head>
11
+ <style>
12
+ body {
13
+ font-family: Arial, sans-serif;
14
+ background-color: #f4f4f4;
15
+ text-align: center;
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+ .container {
20
+ max-width: 600px;
21
+ margin: auto;
22
+ padding: 20px;
23
+ background-color: #fff;
24
+ border-radius: 10px;
25
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
26
+ margin-top: 50px;
27
+ }
28
+ h1 {
29
+ color: #333;
30
+ }
31
+ </style>
32
+ </head>
33
+ <body>
34
+ <div class="container">
35
+ <h1>Stable Diffusion Model</h1>
36
+ {input}
37
+ {output}
38
+ </div>
39
+ </body>
40
+ </html>
41
+ """
42
+
43
+ # Set the custom HTML and launch the interface
44
+ iface.share(html=custom_html)