Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np
|
| 2 |
+
import gradio as gr
|
| 3 |
+
import boxes
|
| 4 |
+
import boxes_2024
|
| 5 |
+
import boxes_2025
|
| 6 |
+
import convert
|
| 7 |
+
#import equiv
|
| 8 |
+
|
| 9 |
+
bloco = gr.Blocks(theme=gr.themes.Monochrome())
|
| 10 |
+
|
| 11 |
+
with bloco:
|
| 12 |
+
with gr.Tabs():
|
| 13 |
+
with gr.TabItem(boxes_2025.title):
|
| 14 |
+
gr.Markdown(boxes_2025.description)
|
| 15 |
+
inputs = boxes_2025.load_inputs()
|
| 16 |
+
text_button = gr.Button("Calcular")
|
| 17 |
+
outputs = [gr.TextArea(lines=1, label="Valor do im贸vel (R$/m虏)"), gr.components.File(label="Download Relat贸rio em PDF")]
|
| 18 |
+
text_button.click(boxes_2025.execute, inputs=inputs, outputs=outputs)
|
| 19 |
+
with gr.TabItem(boxes_2024.title):
|
| 20 |
+
gr.Markdown(boxes_2024.description)
|
| 21 |
+
inputs = boxes_2024.load_inputs()
|
| 22 |
+
text_button = gr.Button("Calcular")
|
| 23 |
+
outputs = [gr.TextArea(lines=1, label="Valor do im贸vel (R$/m虏)"), gr.components.File(label="Download Relat贸rio em PDF")]
|
| 24 |
+
text_button.click(boxes_2024.execute, inputs=inputs, outputs=outputs)
|
| 25 |
+
with gr.TabItem(boxes.title):
|
| 26 |
+
gr.Markdown(boxes.description)
|
| 27 |
+
inputs = boxes.load_inputs()
|
| 28 |
+
text_button = gr.Button("Calcular")
|
| 29 |
+
outputs = gr.TextArea(lines=1, label=boxes.output_label)
|
| 30 |
+
text_button.click(boxes.execute, inputs=inputs, outputs=outputs)
|
| 31 |
+
with gr.TabItem(convert.title):
|
| 32 |
+
gr.Markdown(convert.description)
|
| 33 |
+
inputs = convert.load_inputs()
|
| 34 |
+
text_button = gr.Button("Calcular")
|
| 35 |
+
outputs = gr.TextArea(lines=1, label=convert.output_label)
|
| 36 |
+
text_button.click(convert.execute, inputs=inputs, outputs=outputs)
|
| 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 |
+
bloco.launch()
|