nazneen commited on
Commit
2189b37
1 Parent(s): cb76d50

css styling

Browse files
app.py CHANGED
@@ -26,6 +26,7 @@ from streamlit_vega_lite import altair_component
26
 
27
  # utils
28
  from random import sample
 
29
  # from PIL import Image
30
 
31
 
@@ -82,10 +83,10 @@ def data_comparison(df):
82
  ).interactive()
83
 
84
  legend = alt.Chart(df).mark_point().encode(
85
- y=alt.Y('slice:N', axis=alt.Axis(orient='right'), title=""),
86
  x=alt.X("label"),
87
  shape=alt.Shape('label', scale=alt.Scale(
88
- range=['circle', 'diamond']), legend=None),
89
  color=color
90
  ).add_selection(
91
  selection
@@ -189,7 +190,7 @@ def topic_distribution(weights, smoothing=0.01):
189
  if __name__ == "__main__":
190
  ### STREAMLIT APP CONGFIG ###
191
  st.set_page_config(layout="wide", page_title="Error Slice Analysis")
192
- lcol, rcol = st.columns([3, 2])
193
  # ******* loading the mode and the data
194
  dataset = st.sidebar.selectbox(
195
  "Dataset",
 
26
 
27
  # utils
28
  from random import sample
29
+ from error_analysis import utils as ut
30
  # from PIL import Image
31
 
32
 
 
83
  ).interactive()
84
 
85
  legend = alt.Chart(df).mark_point().encode(
86
+ y=alt.Y('slice:N', axis=alt.Axis(orient='left'), title=""),
87
  x=alt.X("label"),
88
  shape=alt.Shape('label', scale=alt.Scale(
89
+ range=['circle', 'diamond']), legend=['neg', 'pos']),
90
  color=color
91
  ).add_selection(
92
  selection
 
190
  if __name__ == "__main__":
191
  ### STREAMLIT APP CONGFIG ###
192
  st.set_page_config(layout="wide", page_title="Error Slice Analysis")
193
+ lcol, rcol = st.columns([2, 3])
194
  # ******* loading the mode and the data
195
  dataset = st.sidebar.selectbox(
196
  "Dataset",
amazon_polarity.test.parquet → assets/data/amazon_polarity.test.parquet RENAMED
File without changes
error_analysis/utils/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from .style_hacks import *
error_analysis/utils/style_hacks.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ placeholder for all streamlit style hacks
3
+ """
4
+ import streamlit as st
5
+
6
+
7
+ def init_style():
8
+ return st.write(
9
+ """
10
+ <style>
11
+ /* Side Bar */
12
+ .css-1outpf7 {
13
+ background-color:rgb(254 244 219);
14
+ width:30rem;
15
+ padding:10px 10px 10px 10px;
16
+ }
17
+ /* Main Panel*/
18
+ .css-18e3th9 {
19
+ padding:10px 10px 10px 10px;
20
+ }
21
+ .css-1ubw6au:last-child{
22
+ background-color:lightblue;
23
+ }
24
+
25
+ /* Model Panels : element-container */
26
+ .element-container{
27
+ border-style:none
28
+ }
29
+
30
+ /* Radio Button Direction*/
31
+ div.row-widget.stRadio > div{flex-direction:row;}
32
+
33
+ /* Expander Boz*/
34
+ .streamlit-expander {
35
+ border-width: 0px;
36
+ border-bottom: 1px solid #A29C9B;
37
+ border-radius: 10px;
38
+ }
39
+
40
+ .streamlit-expanderHeader {
41
+ font-style: italic;
42
+ font-weight :600;
43
+ font-size:16px;
44
+ padding-top:0px;
45
+ padding-left: 0px;
46
+ color:#A29C9B
47
+
48
+ /* Section Headers */
49
+ .sectionHeader {
50
+ font-size:10px;
51
+ }
52
+
53
+ /* text input*/
54
+ .st-e5 {
55
+ background-color:lightblue;
56
+ }
57
+ /*line special*/
58
+ .line-one{
59
+ border-width: 0px;
60
+ border-bottom: 1px solid #A29C9B;
61
+ border-radius: 50px;
62
+ }
63
+
64
+ </style>
65
+ """,
66
+ unsafe_allow_html=True,
67
+ )