File size: 1,633 Bytes
abc36fe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st
import pandas as pd
import plotly.express as px


@st.cache_data
def get_results(experiment: str):
    path = {
        "linear": "data/f1_linear.parquet",
        "bilstm": "data/f1_bilstm.parquet",
        "finetuning": "data/f1_finetuning.parquet",
    }[experiment]

    df = pd.read_parquet(path)
    df = (df * 100).astype(int)
    return df

TITLE = "F1 Macro scores"

st.set_page_config(page_title=TITLE, page_icon="📈")

st.markdown(f"# {TITLE}")
st.write(
    """TODO: Description"""
)

df_linear = get_results("linear")
df_linear["Experiment"] = "Linear Head"
df_bilstm = get_results("bilstm")
df_bilstm["Experiment"] = "BiLSTM Head"
df_finetuning = get_results("finetuning")
df_finetuning["Experiment"] = "Fine-tuning"

color_range_low = 40
color_range_high = 75

st.plotly_chart(
    px.imshow(
        df_linear,
        title="Linear Head",
        labels=dict(x="Language", y="Model", color="F1 Score"),
        color_continuous_scale="viridis",
        range_color=[color_range_low, color_range_high],
        text_auto=True,
    )
)



st.plotly_chart(
    px.imshow(
        df_bilstm,
        title="BiLSTM Head",
        labels=dict(x="Language", y="Model", color="F1 Score"),
        color_continuous_scale="viridis",
        range_color=[color_range_low, color_range_high],
        text_auto=True,
    )
)

st.plotly_chart(
    px.imshow(
        df_finetuning,
        title="Fine-tuning",
        labels=dict(x="Language", y="Model", color="F1 Score"),
        color_continuous_scale="viridis",
        range_color=[color_range_low, color_range_high],
        text_auto=True,
    )
)