Zaiiida commited on
Commit
8f92845
·
verified ·
1 Parent(s): a93cd0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -4
app.py CHANGED
@@ -157,11 +157,39 @@ gr-image-upload {
157
  margin-bottom: 20px;
158
  }
159
 
160
- .generate-button {
161
- margin-top: 20px;
162
- margin-left: auto;
163
- margin-right: auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  }
 
 
 
 
 
 
165
  """
166
 
167
  with gr.Blocks(theme=CustomTheme(), css=css) as demo:
@@ -194,6 +222,17 @@ with gr.Blocks(theme=CustomTheme(), css=css) as demo:
194
  value=0.85,
195
  step=0.05,
196
  )
 
 
 
 
 
 
 
 
 
 
 
197
 
198
  with gr.Row(elem_id="settings-row"):
199
  do_remove_background = gr.Checkbox(
@@ -233,5 +272,6 @@ with gr.Blocks(theme=CustomTheme(), css=css) as demo:
233
  outputs=[output_model, output_model2]
234
  )
235
 
 
236
  demo.queue(max_size=10)
237
  demo.launch()
 
157
  margin-bottom: 20px;
158
  }
159
 
160
+ /* Кнопка сброса возле слайдера */
161
+ .slider-reset-button {
162
+ width: 25px;
163
+ height: 25px;
164
+ margin-left: 10px; /* Отступ от значения слайдера */
165
+ background-color: #5271FF; /* Цвет кнопки */
166
+ color: #FFFFFF;
167
+ border: none;
168
+ border-radius: 50%; /* Скругление для круглой кнопки */
169
+ font-size: 14px;
170
+ display: flex;
171
+ align-items: center;
172
+ justify-content: center;
173
+ cursor: pointer;
174
+ }
175
+
176
+ .slider-reset-button:hover {
177
+ background-color: #405BBF; /* Цвет при наведении */
178
+ }
179
+
180
+ /* Вкладки OBJ/GLB Model */
181
+ .gr-tab {
182
+ background-color: #252525; /* Чуть светлее общий фон */
183
+ border: 1px solid #FFFFFF; /* Белая рамка для структуры */
184
+ border-radius: 5px; /* Скругление рамок */
185
+ margin-top: 10px; /* Отступ от верхнего элемента */
186
  }
187
+
188
+ .gr-tab label {
189
+ color: #FFFFFF; /* Цвет текста */
190
+ font-weight: bold;
191
+ }
192
+
193
  """
194
 
195
  with gr.Blocks(theme=CustomTheme(), css=css) as demo:
 
222
  value=0.85,
223
  step=0.05,
224
  )
225
+ reset_button = gr.Button(
226
+ "↺", # Символ кнопки сброса
227
+ elem_classes="slider-reset-button",
228
+ interactive=True,
229
+ )
230
+
231
+ reset_button.click(
232
+ fn=lambda: 0.85, # Значение по умолчанию
233
+ inputs=[],
234
+ outputs=[foreground_ratio],
235
+ )
236
 
237
  with gr.Row(elem_id="settings-row"):
238
  do_remove_background = gr.Checkbox(
 
272
  outputs=[output_model, output_model2]
273
  )
274
 
275
+
276
  demo.queue(max_size=10)
277
  demo.launch()