Spaces:
Running
on
T4
Running
on
T4
Update templates/index.html
Browse files- templates/index.html +13 -9
templates/index.html
CHANGED
@@ -29,17 +29,24 @@
|
|
29 |
color: gray;
|
30 |
margin-top: 5px;
|
31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
</style>
|
33 |
</head>
|
34 |
<body>
|
35 |
<div class="container">
|
36 |
<h1>Análisis de Comentarios de YouTube</h1>
|
37 |
<h2>by Cuauhtémoc Bautista</h2>
|
38 |
-
<form method="POST" action="/">
|
39 |
<label for="url">Ingresa una URL de un video de YouTube:</label>
|
40 |
<input type="text" id="url" name="url" required>
|
41 |
<button type="submit">Analizar</button>
|
42 |
</form>
|
|
|
43 |
{% if video_details %}
|
44 |
<div class="video-details">
|
45 |
<h2>Detalles del Video</h2>
|
@@ -52,18 +59,10 @@
|
|
52 |
<p><strong>Comentarios neutros:</strong> {{ sentiment_count.neutro }}</p>
|
53 |
</div>
|
54 |
{% endif %}
|
55 |
-
<!-- {% if wordcloud_path %}
|
56 |
-
<h2>Nube de palabras</h2>
|
57 |
-
<img src={{wordcloud_path}} alt="Nube de Palabras" width="800" height="400">
|
58 |
-
{% endif %} -->
|
59 |
{% if sentiment_daily_graph %}
|
60 |
<h2>Evolución comentarios por sentimiento</h2>
|
61 |
<div>{{ sentiment_daily_graph | safe }}</div>
|
62 |
{% endif %}
|
63 |
-
<!-- {% if k_distance_graph %}
|
64 |
-
<h2>Gráfico de k-Distancias</h2>
|
65 |
-
<div>{{ k_distance_graph | safe }}</div>
|
66 |
-
{% endif %} -->
|
67 |
{% if scores_graph %}
|
68 |
<h2>Gráfico de Scores</h2>
|
69 |
<div>{{ scores_graph | safe }}</div>
|
@@ -73,5 +72,10 @@
|
|
73 |
<div>{{ sankey_graph | safe }}</div>
|
74 |
{% endif %}
|
75 |
</div>
|
|
|
|
|
|
|
|
|
|
|
76 |
</body>
|
77 |
</html>
|
|
|
29 |
color: gray;
|
30 |
margin-top: 5px;
|
31 |
}
|
32 |
+
#processing-message {
|
33 |
+
display: none; /* Ocultamos el mensaje inicialmente */
|
34 |
+
color: yellow; /* Color del mensaje */
|
35 |
+
font-weight: bold; /* Estilo del mensaje */
|
36 |
+
margin-top: 10px; /* Espaciado */
|
37 |
+
}
|
38 |
</style>
|
39 |
</head>
|
40 |
<body>
|
41 |
<div class="container">
|
42 |
<h1>Análisis de Comentarios de YouTube</h1>
|
43 |
<h2>by Cuauhtémoc Bautista</h2>
|
44 |
+
<form method="POST" action="/" onsubmit="showProcessingMessage()">
|
45 |
<label for="url">Ingresa una URL de un video de YouTube:</label>
|
46 |
<input type="text" id="url" name="url" required>
|
47 |
<button type="submit">Analizar</button>
|
48 |
</form>
|
49 |
+
<div id="processing-message">Procesando, por favor espere...</div> <!-- Mensaje de procesamiento -->
|
50 |
{% if video_details %}
|
51 |
<div class="video-details">
|
52 |
<h2>Detalles del Video</h2>
|
|
|
59 |
<p><strong>Comentarios neutros:</strong> {{ sentiment_count.neutro }}</p>
|
60 |
</div>
|
61 |
{% endif %}
|
|
|
|
|
|
|
|
|
62 |
{% if sentiment_daily_graph %}
|
63 |
<h2>Evolución comentarios por sentimiento</h2>
|
64 |
<div>{{ sentiment_daily_graph | safe }}</div>
|
65 |
{% endif %}
|
|
|
|
|
|
|
|
|
66 |
{% if scores_graph %}
|
67 |
<h2>Gráfico de Scores</h2>
|
68 |
<div>{{ scores_graph | safe }}</div>
|
|
|
72 |
<div>{{ sankey_graph | safe }}</div>
|
73 |
{% endif %}
|
74 |
</div>
|
75 |
+
<script>
|
76 |
+
function showProcessingMessage() {
|
77 |
+
document.getElementById("processing-message").style.display = "block"; // Mostrar el mensaje
|
78 |
+
}
|
79 |
+
</script>
|
80 |
</body>
|
81 |
</html>
|