Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
-
"""
|
| 3 |
|
| 4 |
Automatically generated by Colab.
|
| 5 |
|
|
@@ -161,8 +161,42 @@ def get_administradoras_options():
|
|
| 161 |
return []
|
| 162 |
|
| 163 |
# Criando a interface Gradio
|
|
|
|
| 164 |
with gr.Blocks(title="Sistema de Busca de Cons贸rcio Im贸vel") as demo:
|
| 165 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
gr.Markdown("Insira os valores desejados para cr茅dito, entrada e parcela, e filtre por administradora.")
|
| 167 |
|
| 168 |
with gr.Row():
|
|
@@ -173,12 +207,18 @@ with gr.Blocks(title="Sistema de Busca de Cons贸rcio Im贸vel") as demo:
|
|
| 173 |
administradoras_multiselect = gr.CheckboxGroup(
|
| 174 |
label="Filtrar por Administradoras",
|
| 175 |
choices=get_administradoras_options(),
|
| 176 |
-
value=get_administradoras_options()
|
| 177 |
)
|
| 178 |
|
| 179 |
submit_btn = gr.Button("馃攳 Buscar Combina莽玫es", variant="primary")
|
| 180 |
|
| 181 |
-
output_text = gr.Textbox(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
|
| 183 |
submit_btn.click(
|
| 184 |
fn=buscar_combinacoes,
|
|
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
+
"""Imovel.ipynb
|
| 3 |
|
| 4 |
Automatically generated by Colab.
|
| 5 |
|
|
|
|
| 161 |
return []
|
| 162 |
|
| 163 |
# Criando a interface Gradio
|
| 164 |
+
# Criando a interface Gradio com estilo personalizado
|
| 165 |
with gr.Blocks(title="Sistema de Busca de Cons贸rcio Im贸vel") as demo:
|
| 166 |
+
gr.HTML(
|
| 167 |
+
"""
|
| 168 |
+
<style>
|
| 169 |
+
body {
|
| 170 |
+
background-color: #ff8f00 !important;
|
| 171 |
+
color: black !important;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.gr-button {
|
| 175 |
+
background-color: white !important;
|
| 176 |
+
color: black !important;
|
| 177 |
+
font-weight: bold;
|
| 178 |
+
border: 2px solid black !important;
|
| 179 |
+
transition: 0.2s;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.gr-button:hover {
|
| 183 |
+
background-color: #1d449a !important;
|
| 184 |
+
color: white !important;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
label {
|
| 188 |
+
color: black !important;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
input, textarea {
|
| 192 |
+
background-color: white !important;
|
| 193 |
+
color: black !important;
|
| 194 |
+
}
|
| 195 |
+
</style>
|
| 196 |
+
"""
|
| 197 |
+
)
|
| 198 |
+
|
| 199 |
+
gr.Markdown("## 馃彔 Busca de Combina莽玫es de Cons贸rcio Im贸vel")
|
| 200 |
gr.Markdown("Insira os valores desejados para cr茅dito, entrada e parcela, e filtre por administradora.")
|
| 201 |
|
| 202 |
with gr.Row():
|
|
|
|
| 207 |
administradoras_multiselect = gr.CheckboxGroup(
|
| 208 |
label="Filtrar por Administradoras",
|
| 209 |
choices=get_administradoras_options(),
|
| 210 |
+
value=get_administradoras_options()
|
| 211 |
)
|
| 212 |
|
| 213 |
submit_btn = gr.Button("馃攳 Buscar Combina莽玫es", variant="primary")
|
| 214 |
|
| 215 |
+
output_text = gr.Textbox(
|
| 216 |
+
label="Resultados da Busca",
|
| 217 |
+
lines=20,
|
| 218 |
+
max_lines=40,
|
| 219 |
+
interactive=False,
|
| 220 |
+
placeholder="Os resultados aparecer茫o aqui..."
|
| 221 |
+
)
|
| 222 |
|
| 223 |
submit_btn.click(
|
| 224 |
fn=buscar_combinacoes,
|