nazneen commited on
Commit
af6a1d7
1 Parent(s): 0154388

adding parquets

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -62,8 +62,8 @@ def down_samp(embedding):
62
 
63
 
64
  def data_comparison(df):
65
- selection = alt.selection_multi(fields=['cluster:O','label:O'])
66
- color = alt.condition(alt.datum.slice == 'high-loss', alt.Color('cluster:O', scale = alt.Scale(domain=df.cluster.unique().tolist())), alt.value("lightgray"))
67
  opacity = alt.condition(selection, alt.value(0.7), alt.value(0.25))
68
 
69
  # basic chart
@@ -72,7 +72,7 @@ def data_comparison(df):
72
  y=alt.Y('y:Q', axis=None),
73
  color=color,
74
  shape=alt.Shape('label:O', scale=alt.Scale(range=['circle', 'diamond'])),
75
- tooltip=['cluster:O','slice:N','content:N','label:O','pred:O'],
76
  opacity=opacity
77
  ).properties(
78
  width=1000,
@@ -81,7 +81,7 @@ def data_comparison(df):
81
 
82
  legend = alt.Chart(df).mark_point(size=100, filled=True).encode(
83
  x=alt.X("label:O"),
84
- y=alt.Y('cluster:O', axis=alt.Axis(orient='right'), title=""),
85
  shape=alt.Shape('label:O', scale=alt.Scale(
86
  range=['circle', 'diamond']), legend=None),
87
  color=color,
 
62
 
63
 
64
  def data_comparison(df):
65
+ selection = alt.selection_multi(fields=['cluster:N','label:O'])
66
+ color = alt.condition(alt.datum.slice == 'high-loss', alt.Color('cluster:N', scale = alt.Scale(domain=df.cluster.unique().tolist())), alt.value("lightgray"))
67
  opacity = alt.condition(selection, alt.value(0.7), alt.value(0.25))
68
 
69
  # basic chart
 
72
  y=alt.Y('y:Q', axis=None),
73
  color=color,
74
  shape=alt.Shape('label:O', scale=alt.Scale(range=['circle', 'diamond'])),
75
+ tooltip=['cluster:N','slice:N','content:N','label:O','pred:O'],
76
  opacity=opacity
77
  ).properties(
78
  width=1000,
 
81
 
82
  legend = alt.Chart(df).mark_point(size=100, filled=True).encode(
83
  x=alt.X("label:O"),
84
+ y=alt.Y('cluster:N', axis=alt.Axis(orient='right'), title=""),
85
  shape=alt.Shape('label:O', scale=alt.Scale(
86
  range=['circle', 'diamond']), legend=None),
87
  color=color,