File size: 3,356 Bytes
48928c4
 
 
 
 
 
 
 
f2b4dd6
 
 
 
 
 
 
 
 
 
81a9890
48928c4
f2b4dd6
 
 
 
 
 
48928c4
f2b4dd6
 
 
81a9890
 
 
 
48928c4
 
 
 
 
f2b4dd6
 
 
 
 
 
81a9890
 
3e00d91
 
81a9890
 
3e00d91
 
 
 
 
 
81a9890
48928c4
 
 
 
f2b4dd6
 
 
81a9890
3e00d91
81a9890
 
 
 
 
 
 
 
f2b4dd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48928c4
f2b4dd6
 
 
 
 
48928c4
 
 
 
 
 
 
 
 
 
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WandB Run Viewer</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
    <style>
        body, html {
            height: 100%;
            margin: 0;
            padding: 0;
        }
        main.container {
            height: 100vh;
            display: flex;
            flex-direction: column;
            padding: 1rem;
            max-width: 100% !important;
        }
        .form-container {
            flex: 0 0 auto;
            margin-bottom: 1rem;
            max-width: 1200px;
            margin-left: auto;
            margin-right: auto;
            width: 100%;
        }
        .iframe-container {
            flex: 1 1 auto;
            min-height: 0;
            width: 100vw;
            margin-left: calc(-1 * 1rem);
            margin-right: calc(-1 * 1rem);
        }
        .error {
            color: red;
            margin: 1rem 0;
        }
        iframe {
            width: 100%;
            height: 100%;
            border: none;
            display: block;
        }
        .input-group {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }
        .token-link {
            color: #3B82F6;
            text-decoration: none;
            font-size: 0.9rem;
        }
        .token-link:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <main class="container">
        <div class="form-container">
            <form method="POST">
                <div class="grid">
                    <div class="input-group">
                        <a href="https://wandb.ai/authorize" target="_blank" class="token-link">Get Token</a>
                        <input 
                            type="text" 
                            name="token" 
                            placeholder="WandB Token" 
                            required
                            value="{{ token or '' }}"
                        >
                    </div>
                    <input 
                        type="text" 
                        name="entity" 
                        placeholder="Entity" 
                        required
                        value="{{ entity or '' }}"
                    >
                    <input 
                        type="text" 
                        name="project" 
                        placeholder="Project" 
                        required
                        value="{{ project or '' }}"
                    >
                    <input 
                        type="text" 
                        name="run_id" 
                        placeholder="Run ID" 
                        required
                        value="{{ run_id or '' }}"
                    >
                </div>
                <button type="submit">Load Run</button>
            </form>

            {% if error %}
            <div class="error">
                {{ error }}
            </div>
            {% endif %}
        </div>

        {% if iframe_html %}
        <div class="iframe-container">
            {{ iframe_html | safe }}
        </div>
        {% endif %}
    </main>
</body>
</html>