File size: 1,386 Bytes
9392036
 
913507e
 
1280fd8
9392036
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1280fd8
9392036
 
b93d6c3
9392036
 
 
 
 
 
913507e
9392036
 
1280fd8
9392036
 
 
 
 
 
1280fd8
 
913507e
9392036
 
 
 
1280fd8
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
import streamlit as st
import pandas as pd
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource, HoverTool

# --- Define Styles ---
st.markdown(
    """
    <style>
    .main-title {
        font-size: 50px;
        color: #4CAF50;
        text-align: center;
    }
    .sub-title {
        font-size: 30px;
        color: #555;
    }
    .custom-text {
        font-size: 18px;
        line-height: 1.5;
    }
    </style>
    """,
    unsafe_allow_html=True
)

st.markdown('<h1 class="main-title">Merit Secret Embeddings πŸŽ’πŸ“ƒπŸ†</h1>', unsafe_allow_html=True)
st.markdown('<h2 class="sub-title">Donut</h2>', unsafe_allow_html=True)
st.markdown(
    """
    <p class="custom-text">
    Explore how Donut perceive real data. 
    </p>
    """,
    unsafe_allow_html=True
)

# Get Data
df = pd.read_csv("data/data.csv")

source = ColumnDataSource(data=dict(
    x=df['x'],
    y=df['y'],
    label=df['label'],
    img=df['img']
))

# Configure figure
TOOLTIPS = """
<div>
    <div>
        <img src="@img{safe}" style="width:400px; height:auto; float: left; margin: 0px 15px 15px 0px;" alt="@img" border="2"></img>
    </div>
    <div>
        <span style="font-size: 17px; font-weight: bold;">@label</span>
    </div>
</div>
"""


p = figure(width=400, height=400, tooltips=TOOLTIPS, title="")
p.scatter('x', 'y', size=20, source=source)

st.bokeh_chart(p)