<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Proses Normalisasi</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
    <div class="container">
        <!-- Back Button -->
        <a href="/" class="back-button"><i class="fas fa-arrow-left"></i> Kembali ke Dashboard</a>

        <header>
            <h1>Proses Normalisasi</h1>
        </header>

        <!-- Form untuk memilih platform dan menampilkan data normalisasi -->
        <form action="/normalisasi" method="POST">
            <label for="platform">Pilih Platform:</label>
            <select name="platform" id="platform">
                <option value="Instagram">Instagram</option>
                <option value="Twitter">Twitter</option>
            </select>

            <button type="submit">Tampilkan Data Normalisasi</button>
        </form>

        <!-- Menampilkan hasil normalisasi -->
        {% if result %}
        <div class="result-box">
            <h3>Before Normalisasi:</h3>
            <table>
                <tr>
                    <th>No</th>
                    <th>Data</th>
                </tr>
                {% for index, row in result['before'].items() %}
                <tr>
                    <td>{{ index }}</td>
                    <td>{{ row }}</td>
                </tr>
                {% endfor %}
            </table>

            <h3>After Normalisasi:</h3>
            <table>
                <tr>
                    <th>No</th>
                    <th>Data</th>
                </tr>
                {% for index, row in result['after'].items() %}
                <tr>
                    <td>{{ index }}</td>
                    <td>{{ row }}</td>
                </tr>
                {% endfor %}
            </table>
        </div>
        {% endif %}

        <footer>
            <p>&copy; 2025 Sentiment Analysis App. All rights reserved.</p>
        </footer>
    </div>
</body>
</html>
