Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -273,12 +273,26 @@ def processar_relatorio(html_file, tarefa_files):
|
|
| 273 |
|
| 274 |
return df.to_html(index=False), html_output_path, pdf_output_path
|
| 275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
# --- Interface Gradio ---
|
| 277 |
-
with gr.Blocks() as interface:
|
| 278 |
gr.Markdown("# Processamento de Relat贸rios de Tarefas")
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 282 |
output_html = gr.HTML()
|
| 283 |
download_html_btn = gr.File(label="Download HTML Report")
|
| 284 |
download_pdf_btn = gr.File(label="Download PDF Report")
|
|
|
|
| 273 |
|
| 274 |
return df.to_html(index=False), html_output_path, pdf_output_path
|
| 275 |
|
| 276 |
+
# Tema personalizado
|
| 277 |
+
theme = gr.themes.Default(
|
| 278 |
+
primary_hue="blue", # Cor principal (tons de azul)
|
| 279 |
+
secondary_hue="gray", # Cor secund谩ria (tons de cinza)
|
| 280 |
+
font=["Arial", "sans-serif"], # Fam铆lia de fontes
|
| 281 |
+
font_mono=["Courier New", "monospace"], # Fonte para c贸digo
|
| 282 |
+
)
|
| 283 |
+
|
| 284 |
# --- Interface Gradio ---
|
| 285 |
+
with gr.Blocks(theme=theme) as interface:
|
| 286 |
gr.Markdown("# Processamento de Relat贸rios de Tarefas")
|
| 287 |
+
with gr.Row():
|
| 288 |
+
with gr.Column():
|
| 289 |
+
gr.Markdown("## Arquivo HTML (alunos.htm)")
|
| 290 |
+
html_file = gr.File(label="Arraste o arquivo .htm aqui", type="binary")
|
| 291 |
+
with gr.Column():
|
| 292 |
+
gr.Markdown("## Arquivos Excel (Relat贸rios de Tarefas)")
|
| 293 |
+
excel_files = gr.Files(label="Arraste os arquivos .xlsx aqui", type="binary", file_count="multiple")
|
| 294 |
+
|
| 295 |
+
generate_btn = gr.Button("Gerar Relat贸rio", variant="primary") # Destaque no bot茫o
|
| 296 |
output_html = gr.HTML()
|
| 297 |
download_html_btn = gr.File(label="Download HTML Report")
|
| 298 |
download_pdf_btn = gr.File(label="Download PDF Report")
|