DazDin commited on
Commit
168ab84
·
verified ·
1 Parent(s): 143d91b
Files changed (1) hide show
  1. app.py +4 -154
app.py CHANGED
@@ -1,7 +1,10 @@
 
1
  import gradio as gr
2
  from random import randint
3
  from all_models import models
4
 
 
 
5
  def load_fn(models):
6
  global models_load
7
  models_load = {}
@@ -64,160 +67,7 @@ def make_me():
64
  with gr.Row():
65
  gr.HTML("")
66
 
67
- custom_css = """
68
- :root {
69
- --body-background-fill: #2d3d4f;
70
- }
71
- body {
72
- background-color: var(--body-background-fill) !important;
73
- color: #2d3d4f;
74
- margin: 0;
75
- padding: 0;
76
- font-family: Arial, sans-serif;
77
- height: 100vh;
78
- overflow-y: auto;
79
- }
80
- .gradio-container {
81
- background-color: #2d3d4f;
82
- color: #c5c6c7;
83
- padding: 20px;
84
- border-radius: 8px;
85
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
86
- width: 100%;
87
- max-width: 1200px;
88
- margin: 20px auto;
89
- display: block;
90
- min-height: 100vh;
91
- }
92
- .app_title {
93
- background-color: #2d3d4f;
94
- color: #c5c6c7;
95
- padding: 10px 20px;
96
- border-bottom: 1px solid #3b4252;
97
- text-align: center;
98
- font-size: 24px;
99
- font-weight: bold;
100
- width: 100%;
101
- box-sizing: border-box;
102
- margin-bottom: 20px;
103
- }
104
- .custom_textbox {
105
- background-color: #2d343f;
106
- border: 1px solid #3b4252;
107
- color: #7f8184;
108
- padding: 10px;
109
- border-radius: 4px;
110
- margin-bottom: 10px;
111
- width: 100%;
112
- box-sizing: border-box;
113
- }
114
- .custom_gen_button {
115
- background-color: #8b38ff;
116
- border: 1px solid #ffffff;
117
- color: blue;
118
- padding: 15px 32px;
119
- text-align: center;
120
- text-decoration: none;
121
- display: inline-block;
122
- font-size: 16px;
123
- margin: 4px 2px;
124
- cursor: pointer;
125
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
126
- transition: transform 0.2s, box-shadow 0.2s;
127
- border-radius: 4px;
128
- }
129
- .custom_gen_button:hover {
130
- transform: translateY(-2px);
131
- box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
132
- }
133
- .custom_stop_button {
134
- background-color: #6200ea;
135
- border: 1px solid #ffffff;
136
- color: blue;
137
- padding: 15px 32px;
138
- text-align: center;
139
- text-decoration: none;
140
- display: inline-block;
141
- font-size: 16px;
142
- margin: 4px 2px;
143
- cursor: pointer;
144
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
145
- transition: transform 0.2s, box-shadow 0.2s;
146
- border-radius: 4px;
147
- }
148
- .custom_stop_button:hover {
149
- transform: translateY(-2px);
150
- box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
151
- }
152
- .custom_image {
153
- border: 1px solid #3b4252;
154
- background-color: #2d343f;
155
- border-radius: 4px;
156
- margin: 20px;
157
- max-width: 100%;
158
- box-sizing: border-box;
159
- width: 100%;
160
- height: auto;
161
- }
162
- .custom_accordion {
163
- background-color: #2d3d4f;
164
- color: #7f8184;
165
- border: 1px solid #3b4252;
166
- border-radius: 4px;
167
- margin-top: 20px;
168
- width: 100%;
169
- box-sizing: border-box;
170
- transition: margin 0.2s ease;
171
- }
172
- .custom_accordion .gr-accordion-header {
173
- background-color: #2d3d4f;
174
- color: #7f8184;
175
- padding: 10px 20px;
176
- border-bottom: 1px solid #5b6270;
177
- cursor: pointer;
178
- font-size: 18px;
179
- font-weight: bold;
180
- height: 40px;
181
- display: flex;
182
- align-items: center;
183
- }
184
- .custom_accordion .gr-accordion-header:hover {
185
- background-color: #2d3d4f;
186
- }
187
- .custom_accordion .gr-accordion-content {
188
- padding: 10px 20px;
189
- background-color: #2d3d4f;
190
- border-top: 1px solid #5b6270;
191
- max-height: 0;
192
- overflow: hidden;
193
- transition: max-height 0.2s ease;
194
- }
195
- .custom_accordion .gr-accordion-content.open {
196
- max-height: 500px;
197
- }
198
- .custom_checkbox_group {
199
- background-color: #2d343f;
200
- border: 1px solid #3b4252;
201
- color: #7f8184;
202
- border-radius: 4px;
203
- padding: 10px;
204
- width: 100%;
205
- box-sizing: border-box;
206
- }
207
- @media (max-width: 768px) {
208
- .gradio-container {
209
- width: 100%;
210
- margin: 0;
211
- padding: 10px;
212
- }
213
- .custom_textbox,.custom_image,.custom_checkbox_group {
214
- width: 100%;
215
- box-sizing: border-box;
216
- }
217
- }
218
- """
219
-
220
- with gr.Blocks(css=custom_css) as demo:
221
  make_me()
222
 
223
  demo.queue(concurrency_count=50)
 
1
+ import os
2
  import gradio as gr
3
  from random import randint
4
  from all_models import models
5
 
6
+ css_code = os.getenv("DazDinGo_CSS", "")
7
+
8
  def load_fn(models):
9
  global models_load
10
  models_load = {}
 
67
  with gr.Row():
68
  gr.HTML("")
69
 
70
+ with gr.Blocks(css=css_code) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  make_me()
72
 
73
  demo.queue(concurrency_count=50)