Update app.py
Browse files
app.py
CHANGED
|
@@ -4,47 +4,48 @@ import boxes
|
|
| 4 |
import boxes_2024
|
| 5 |
import boxes_2025
|
| 6 |
import convert
|
| 7 |
-
#import equiv
|
| 8 |
|
| 9 |
bloco = gr.Blocks()
|
| 10 |
|
| 11 |
with bloco:
|
| 12 |
with gr.Tabs():
|
|
|
|
| 13 |
with gr.TabItem(boxes_2025.title):
|
| 14 |
gr.Markdown(boxes_2025.description)
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
with gr.TabItem(boxes_2024.title):
|
| 20 |
gr.Markdown(boxes_2024.description)
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
with gr.TabItem(boxes.title):
|
| 26 |
gr.Markdown(boxes.description)
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
| 31 |
with gr.TabItem(convert.title):
|
| 32 |
gr.Markdown(convert.description)
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
#with gr.TabItem(equiv.title):
|
| 38 |
-
#gr.Markdown(equiv.description)
|
| 39 |
-
#inputs = equiv.load_inputs()
|
| 40 |
-
#text_button = gr.Button("Gerar")
|
| 41 |
-
#outputs = [gr.Textbox(label="Documenta莽茫o apresentada"),
|
| 42 |
-
#gr.Textbox(label="T铆tulo"),
|
| 43 |
-
#gr.Textbox(label="EQUIVAL脢NCIA PARA 脥NDICE CONSTRUTIVO"),
|
| 44 |
-
#gr.Textbox(label="Resultados"),
|
| 45 |
-
#gr.Plot(label="Localiza莽茫o do Im贸vel de Origem e de Destino"),
|
| 46 |
-
#gr.File(label="Informa莽茫o T茅cnica - arquivo PDF"),
|
| 47 |
-
#gr.File(label="Hist贸rico das IT's - arquivo Excel"),]
|
| 48 |
-
#text_button.click(equiv.calculate_equivalent, inputs=inputs, outputs=outputs)
|
| 49 |
|
| 50 |
-
|
|
|
|
|
|
| 4 |
import boxes_2024
|
| 5 |
import boxes_2025
|
| 6 |
import convert
|
|
|
|
| 7 |
|
| 8 |
bloco = gr.Blocks()
|
| 9 |
|
| 10 |
with bloco:
|
| 11 |
with gr.Tabs():
|
| 12 |
+
# Tab 2025
|
| 13 |
with gr.TabItem(boxes_2025.title):
|
| 14 |
gr.Markdown(boxes_2025.description)
|
| 15 |
+
inputs_25 = boxes_2025.load_inputs()
|
| 16 |
+
btn_25 = gr.Button("Calcular")
|
| 17 |
+
outputs_25 = [
|
| 18 |
+
gr.Textbox(lines=1, label="Valor do im贸vel (R$/m虏)"),
|
| 19 |
+
gr.File(label="Download Relat贸rio em PDF")
|
| 20 |
+
]
|
| 21 |
+
btn_25.click(boxes_2025.execute, inputs=inputs_25, outputs=outputs_25)
|
| 22 |
+
|
| 23 |
+
# Tab 2024
|
| 24 |
with gr.TabItem(boxes_2024.title):
|
| 25 |
gr.Markdown(boxes_2024.description)
|
| 26 |
+
inputs_24 = boxes_2024.load_inputs()
|
| 27 |
+
btn_24 = gr.Button("Calcular")
|
| 28 |
+
outputs_24 = [
|
| 29 |
+
gr.Textbox(lines=1, label="Valor do im贸vel (R$/m虏)"),
|
| 30 |
+
gr.File(label="Download Relat贸rio em PDF")
|
| 31 |
+
]
|
| 32 |
+
btn_24.click(boxes_2024.execute, inputs=inputs_24, outputs=outputs_24)
|
| 33 |
+
|
| 34 |
+
# Tab Geral
|
| 35 |
with gr.TabItem(boxes.title):
|
| 36 |
gr.Markdown(boxes.description)
|
| 37 |
+
inputs_boxes = boxes.load_inputs()
|
| 38 |
+
btn_boxes = gr.Button("Calcular")
|
| 39 |
+
outputs_boxes = gr.Textbox(lines=1, label=boxes.output_label)
|
| 40 |
+
btn_boxes.click(boxes.execute, inputs=inputs_boxes, outputs=outputs_boxes)
|
| 41 |
+
|
| 42 |
+
# Tab Conversor
|
| 43 |
with gr.TabItem(convert.title):
|
| 44 |
gr.Markdown(convert.description)
|
| 45 |
+
inputs_conv = convert.load_inputs()
|
| 46 |
+
btn_conv = gr.Button("Calcular")
|
| 47 |
+
outputs_conv = gr.Textbox(lines=1, label=convert.output_label)
|
| 48 |
+
btn_conv.click(convert.execute, inputs=inputs_conv, outputs=outputs_conv)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
# O segredo para o Spaces 茅 n茫o definir porta/host e desativar SSR
|
| 51 |
+
bloco.launch()
|