Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,12 +52,12 @@ def generar_html_con_colores(serp_results, common_urls, color_palette):
|
|
52 |
if i < len(serp_results[keyword]):
|
53 |
entry = serp_results[keyword][i]
|
54 |
url = entry["URL"]
|
55 |
-
display_url = "<a href='{url}' target='_blank' style='color:{color}'>{url}</a>".format(url=url)
|
56 |
if url in common_urls:
|
57 |
color = color_palette[0] # Use a specific color for common URLs
|
58 |
-
|
59 |
else:
|
60 |
-
|
|
|
61 |
else:
|
62 |
html_table += "<td></td>"
|
63 |
html_table += "</tr>"
|
@@ -87,7 +87,7 @@ iface = gr.Interface(
|
|
87 |
inputs="text",
|
88 |
outputs=["html", "html"],
|
89 |
title="Comparador de Keywords en Google",
|
90 |
-
description="Introduce las keywords separadas por comas para encontrar coincidencias en los resultados de búsqueda de Google y calcular el porcentaje de similaridad entre ellos. Las
|
91 |
)
|
92 |
|
93 |
iface.launch()
|
|
|
52 |
if i < len(serp_results[keyword]):
|
53 |
entry = serp_results[keyword][i]
|
54 |
url = entry["URL"]
|
|
|
55 |
if url in common_urls:
|
56 |
color = color_palette[0] # Use a specific color for common URLs
|
57 |
+
display_url = f"<a href='{url}' target='_blank' style='color:{color};'>{url}</a>"
|
58 |
else:
|
59 |
+
display_url = f"<a href='{url}' target='_blank'>{url}</a>"
|
60 |
+
html_table += f"<td>{display_url}</td>"
|
61 |
else:
|
62 |
html_table += "<td></td>"
|
63 |
html_table += "</tr>"
|
|
|
87 |
inputs="text",
|
88 |
outputs=["html", "html"],
|
89 |
title="Comparador de Keywords en Google",
|
90 |
+
description="Introduce las keywords separadas por comas para encontrar coincidencias en los resultados de búsqueda de Google y calcular el porcentaje de similaridad entre ellos. Las URLs comunes se resaltarán en color."
|
91 |
)
|
92 |
|
93 |
iface.launch()
|