File size: 1,668 Bytes
53d77b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dashboard</title>
    <style>

        body {

            font-family: Arial, sans-serif;

            background-color: #f4f4f4;

            margin: 0;

            padding: 0;

        }

        .container {

            max-width: 1200px;

            margin: 0 auto;

            padding: 20px;

        }

        h1 {

            color: #333;

        }

        .gradio-container {

            margin-top: 20px;

        }

        iframe {

            border: none;

            width: 100%;

            height: 800px;

        }

        .logout {

            margin-top: 20px;

            text-align: right;

        }

        .start-button {

            margin-top: 20px;

            background-color: #4CAF50;

            color: white;

            border: none;

            padding: 10px 20px;

            text-align: center;

            text-decoration: none;

            display: inline-block;

            font-size: 16px;

            cursor: pointer;

            border-radius: 4px;

        }

    </style>
    <script>

        function openGradioInNewWindow() {

            window.open("{{ url_for('gradio') }}");

        }

    </script>
</head>
<body>
    <div class="container">
        <h1>Welcome, {{ name }}!</h1>
        <button class="start-button" onclick="openGradioInNewWindow()">Start the Chatbot</button>
       
        <div class="logout">
            <a href="{{ url_for('logout') }}">Logout</a>
        </div>
    </div>
</body>
</html>