Spaces:
Runtime error
Runtime error
fixed layout
Browse files
app.py
CHANGED
@@ -58,7 +58,10 @@ examples = load_pickle('test.pkl')
|
|
58 |
|
59 |
### Process input
|
60 |
ex = examples['comment'].sample(1).tolist()[0]
|
61 |
-
|
|
|
|
|
|
|
62 |
if 'comment' not in st.session_state:
|
63 |
st.session_state['comment'] = ex
|
64 |
with st.form('comment_form'):
|
@@ -96,7 +99,7 @@ with tabs[0]:
|
|
96 |
'bar': {'color': color, 'thickness': 1.0},
|
97 |
|
98 |
}
|
99 |
-
))#, layout=go.Layout(width=750, height=300))# layout={'paper_bgcolor': 'rgb(245,245,245)'})#,
|
100 |
|
101 |
cols = st.columns([7, 3])
|
102 |
with cols[0]:
|
|
|
58 |
|
59 |
### Process input
|
60 |
ex = examples['comment'].sample(1).tolist()[0]
|
61 |
+
try:
|
62 |
+
ex = ex.strip().replace('_x000D_', '').replace('nan', 'blank')
|
63 |
+
except:
|
64 |
+
ex = 'blank'
|
65 |
if 'comment' not in st.session_state:
|
66 |
st.session_state['comment'] = ex
|
67 |
with st.form('comment_form'):
|
|
|
99 |
'bar': {'color': color, 'thickness': 1.0},
|
100 |
|
101 |
}
|
102 |
+
), layout=go.Layout(margin=dict(t=0, b=135)))#, layout=go.Layout(width=750, height=300))# layout={'paper_bgcolor': 'rgb(245,245,245)'})#,
|
103 |
|
104 |
cols = st.columns([7, 3])
|
105 |
with cols[0]:
|