Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -237,21 +237,46 @@ def update_foreground_ratio(img_proc, fr):
|
|
237 |
gr.update(value=show_mask_img(foreground_res)),
|
238 |
)
|
239 |
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
with gr.Blocks() as demo:
|
242 |
img_proc_state = gr.State()
|
243 |
background_remove_state = gr.State()
|
244 |
-
|
245 |
-
# SF3D: Stable Fast 3D Mesh Reconstruction with UV-unwrapping and Illumination Disentanglement
|
246 |
-
|
247 |
-
**SF3D** is a state-of-the-art method for 3D mesh reconstruction from a single image.
|
248 |
-
This demo allows you to upload an image and generate a 3D mesh model from it.
|
249 |
-
|
250 |
-
**Tips**
|
251 |
-
1. If the image already has an alpha channel, you can skip the background removal step.
|
252 |
-
2. You can adjust the foreground ratio to control the size of the foreground object. This can influence the shape
|
253 |
-
3. You can upload your own HDR environment map to light the 3D model.
|
254 |
-
""")
|
255 |
with gr.Row(variant="panel"):
|
256 |
with gr.Column():
|
257 |
with gr.Row():
|
|
|
237 |
gr.update(value=show_mask_img(foreground_res)),
|
238 |
)
|
239 |
|
240 |
+
css = """
|
241 |
+
/* Задаем фоновый цвет всей страницы */
|
242 |
+
body {
|
243 |
+
background-color: #191a1e !important; /* Тёмный фон */
|
244 |
+
margin: 0;
|
245 |
+
padding: 0;
|
246 |
+
}
|
247 |
+
|
248 |
+
/* Применяем шрифты */
|
249 |
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');
|
250 |
+
body, input, button, textarea, select, .gr-button {
|
251 |
+
font-family: 'Poppins', sans-serif;
|
252 |
+
color: #FFFFFF;
|
253 |
+
}
|
254 |
+
|
255 |
+
/* Настройки заголовков */
|
256 |
+
h1, h2, h3, h4, h5, h6 {
|
257 |
+
font-family: 'Poppins', sans-serif;
|
258 |
+
font-weight: 700;
|
259 |
+
color: #FFFFFF;
|
260 |
+
}
|
261 |
+
|
262 |
+
/* Цвет кнопок */
|
263 |
+
.generate-button {
|
264 |
+
background-color: #5271FF !important; /* Голубой */
|
265 |
+
color: #FFFFFF !important;
|
266 |
+
border: none;
|
267 |
+
font-weight: bold;
|
268 |
+
}
|
269 |
+
|
270 |
+
/* Цвет контейнеров */
|
271 |
+
.gr-block {
|
272 |
+
background-color: #1c1c24 !important; /* Голубоватый тёмный фон */
|
273 |
+
border: 1px solid #5271FF !important; /* Голубая рамка */
|
274 |
+
}
|
275 |
+
"""
|
276 |
with gr.Blocks() as demo:
|
277 |
img_proc_state = gr.State()
|
278 |
background_remove_state = gr.State()
|
279 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
with gr.Row(variant="panel"):
|
281 |
with gr.Column():
|
282 |
with gr.Row():
|