Commit
·
fde96e8
1
Parent(s):
354ca2f
css
Browse files
app.py
CHANGED
@@ -2,12 +2,8 @@ import gradio as gr
|
|
2 |
from PIL import Image
|
3 |
import time
|
4 |
|
5 |
-
#
|
6 |
-
|
7 |
-
# Simulate a model processing time
|
8 |
-
time.sleep(2)
|
9 |
-
# Return a placeholder image
|
10 |
-
return Image.new('RGB', (512, 512), color = (73, 109, 137))
|
11 |
|
12 |
# Define Gradio interface with a loading animation
|
13 |
def model_with_loading(prompt):
|
@@ -15,26 +11,30 @@ def model_with_loading(prompt):
|
|
15 |
|
16 |
# Custom CSS for D&D theme
|
17 |
custom_css = """
|
|
|
|
|
18 |
body {
|
19 |
-
background-color: #
|
20 |
color: #f5f5f5;
|
21 |
-
font-family: '
|
22 |
}
|
23 |
|
24 |
.gradio-container {
|
25 |
-
background-color: #
|
26 |
-
border-radius:
|
27 |
-
box-shadow: 0
|
|
|
28 |
}
|
29 |
|
30 |
.gr-button {
|
31 |
background-color: #8b4513;
|
32 |
color: #f5f5f5;
|
33 |
border: none;
|
34 |
-
border-radius:
|
35 |
-
padding:
|
36 |
-
font-size:
|
37 |
cursor: pointer;
|
|
|
38 |
}
|
39 |
|
40 |
.gr-button:hover {
|
@@ -42,12 +42,14 @@ body {
|
|
42 |
}
|
43 |
|
44 |
.gr-textbox {
|
45 |
-
background-color: #
|
46 |
color: #f5f5f5;
|
47 |
-
border:
|
48 |
-
border-radius:
|
49 |
-
padding:
|
50 |
-
font-size:
|
|
|
|
|
51 |
}
|
52 |
|
53 |
.gr-textbox::placeholder {
|
@@ -55,24 +57,30 @@ body {
|
|
55 |
}
|
56 |
|
57 |
.gr-image {
|
58 |
-
border:
|
59 |
-
border-radius:
|
|
|
60 |
}
|
61 |
|
62 |
.gr-title {
|
63 |
color: #ffd700;
|
64 |
-
font-size:
|
65 |
font-weight: bold;
|
|
|
|
|
66 |
}
|
67 |
|
68 |
.gr-description {
|
69 |
color: #ffd700;
|
70 |
-
font-size:
|
|
|
|
|
71 |
}
|
72 |
|
73 |
.gr-link {
|
74 |
color: #ffd700;
|
75 |
text-decoration: underline;
|
|
|
76 |
}
|
77 |
|
78 |
.gr-link:hover {
|
|
|
2 |
from PIL import Image
|
3 |
import time
|
4 |
|
5 |
+
# Load the model from Hugging Face
|
6 |
+
model = gr.load("models/prashanth970/flux-lora-uncensored")
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Define Gradio interface with a loading animation
|
9 |
def model_with_loading(prompt):
|
|
|
11 |
|
12 |
# Custom CSS for D&D theme
|
13 |
custom_css = """
|
14 |
+
@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');
|
15 |
+
|
16 |
body {
|
17 |
+
background-color: #1a1a1a;
|
18 |
color: #f5f5f5;
|
19 |
+
font-family: 'MedievalSharp', cursive;
|
20 |
}
|
21 |
|
22 |
.gradio-container {
|
23 |
+
background-color: #2c2c2c;
|
24 |
+
border-radius: 15px;
|
25 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
|
26 |
+
padding: 20px;
|
27 |
}
|
28 |
|
29 |
.gr-button {
|
30 |
background-color: #8b4513;
|
31 |
color: #f5f5f5;
|
32 |
border: none;
|
33 |
+
border-radius: 8px;
|
34 |
+
padding: 12px 24px;
|
35 |
+
font-size: 18px;
|
36 |
cursor: pointer;
|
37 |
+
transition: background-color 0.3s;
|
38 |
}
|
39 |
|
40 |
.gr-button:hover {
|
|
|
42 |
}
|
43 |
|
44 |
.gr-textbox {
|
45 |
+
background-color: #3c3c3c;
|
46 |
color: #f5f5f5;
|
47 |
+
border: 2px solid #8b4513;
|
48 |
+
border-radius: 8px;
|
49 |
+
padding: 12px;
|
50 |
+
font-size: 18px;
|
51 |
+
width: 100%;
|
52 |
+
box-sizing: border-box;
|
53 |
}
|
54 |
|
55 |
.gr-textbox::placeholder {
|
|
|
57 |
}
|
58 |
|
59 |
.gr-image {
|
60 |
+
border: 4px solid #8b4513;
|
61 |
+
border-radius: 15px;
|
62 |
+
margin-top: 20px;
|
63 |
}
|
64 |
|
65 |
.gr-title {
|
66 |
color: #ffd700;
|
67 |
+
font-size: 32px;
|
68 |
font-weight: bold;
|
69 |
+
text-align: center;
|
70 |
+
margin-bottom: 20px;
|
71 |
}
|
72 |
|
73 |
.gr-description {
|
74 |
color: #ffd700;
|
75 |
+
font-size: 20px;
|
76 |
+
text-align: center;
|
77 |
+
margin-bottom: 20px;
|
78 |
}
|
79 |
|
80 |
.gr-link {
|
81 |
color: #ffd700;
|
82 |
text-decoration: underline;
|
83 |
+
font-size: 18px;
|
84 |
}
|
85 |
|
86 |
.gr-link:hover {
|