Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -76,8 +76,8 @@ def generate(image):
|
|
76 |
|
77 |
def run_example(image_pil):
|
78 |
preprocessed = preprocess(image_pil, False, 0.9)
|
79 |
-
mesh_name,
|
80 |
-
return preprocessed, mesh_name,
|
81 |
|
82 |
|
83 |
class CustomTheme(gr.themes.Base):
|
@@ -103,7 +103,7 @@ footer {
|
|
103 |
padding: 0;
|
104 |
overflow: hidden;
|
105 |
}
|
106 |
-
@import url('https://fonts.googleapis.com/css2?
|
107 |
/* Применяем шрифты */
|
108 |
body, input, button, textarea, select,.gr-button {
|
109 |
font-family: 'Poppins', sans-serif;
|
@@ -131,11 +131,23 @@ input[type="text"], textarea {
|
|
131 |
}
|
132 |
.generate-button:hover {
|
133 |
background-color: #405BBF!important; /* Цвет при наведении */
|
|
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
"""
|
141 |
|
@@ -150,7 +162,7 @@ with gr.Blocks(theme=CustomTheme(), css=css) as demo:
|
|
150 |
sources="upload",
|
151 |
type="pil",
|
152 |
elem_id="content_image",
|
153 |
-
width=500, #
|
154 |
)
|
155 |
with gr.Column():
|
156 |
do_remove_background = gr.Checkbox(
|
|
|
76 |
|
77 |
def run_example(image_pil):
|
78 |
preprocessed = preprocess(image_pil, False, 0.9)
|
79 |
+
mesh_name, mesn_name2 = generate(preprocessed)
|
80 |
+
return preprocessed, mesh_name, mesn_name2
|
81 |
|
82 |
|
83 |
class CustomTheme(gr.themes.Base):
|
|
|
103 |
padding: 0;
|
104 |
overflow: hidden;
|
105 |
}
|
106 |
+
@import url('https://fonts.googleapis.com/css2?familyPoppins:wght@400;500;700&display=swap');
|
107 |
/* Применяем шрифты */
|
108 |
body, input, button, textarea, select,.gr-button {
|
109 |
font-family: 'Poppins', sans-serif;
|
|
|
131 |
}
|
132 |
.generate-button:hover {
|
133 |
background-color: #405BBF!important; /* Цвет при наведении */
|
134 |
+
/* Выравнивание элементов */
|
135 |
+
.drop-image-container {
|
136 |
+
display: flex;
|
137 |
+
flex-direction: column;
|
138 |
+
align-items: center;
|
139 |
}
|
140 |
+
.drop-image,.processed-image {
|
141 |
+
margin-bottom: 20px;
|
142 |
+
}
|
143 |
+
.foreground-ratio-container {
|
144 |
+
margin-top: 20px;
|
145 |
+
margin-bottom: 20px;
|
146 |
+
}
|
147 |
+
.generate-button {
|
148 |
+
margin-top: 20px;
|
149 |
+
margin-left: auto;
|
150 |
+
margin-right: auto;
|
151 |
}
|
152 |
"""
|
153 |
|
|
|
162 |
sources="upload",
|
163 |
type="pil",
|
164 |
elem_id="content_image",
|
165 |
+
width=500, # Увеличена ширина входного изображения
|
166 |
)
|
167 |
with gr.Column():
|
168 |
do_remove_background = gr.Checkbox(
|