Update app.py
Browse files
app.py
CHANGED
@@ -103,6 +103,7 @@ def create_interface() -> gr.Blocks:
|
|
103 |
def generate_report() -> str:
|
104 |
"""
|
105 |
Genera un informe en formato JSON con el análisis SEO y lo guarda en content_storage.
|
|
|
106 |
"""
|
107 |
if analyzer.current_analysis:
|
108 |
report_path = "content_storage/seo_report.json"
|
@@ -131,7 +132,8 @@ def create_interface() -> gr.Blocks:
|
|
131 |
)
|
132 |
download_btn.click(
|
133 |
fn=generate_report,
|
134 |
-
outputs=
|
|
|
135 |
)
|
136 |
plot_btn.click(
|
137 |
fn=plot_internal_links,
|
|
|
103 |
def generate_report() -> str:
|
104 |
"""
|
105 |
Genera un informe en formato JSON con el análisis SEO y lo guarda en content_storage.
|
106 |
+
Retorna la ruta del archivo generado.
|
107 |
"""
|
108 |
if analyzer.current_analysis:
|
109 |
report_path = "content_storage/seo_report.json"
|
|
|
132 |
)
|
133 |
download_btn.click(
|
134 |
fn=generate_report,
|
135 |
+
outputs=download_btn,
|
136 |
+
_js="(report_path) => { if(report_path) { window.open(report_path, '_blank'); } }"
|
137 |
)
|
138 |
plot_btn.click(
|
139 |
fn=plot_internal_links,
|