tsantos commited on
Commit
55a72ba
·
1 Parent(s): 6450a99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -106,7 +106,7 @@ def main(myargs):
106
  if st.session_state['input_type'] == 'File' and "embeddings_all" in st.session_state and st.session_state.embeddings_plot in ["2D", "3D"]:
107
  indices = [x for x in range(st.session_state.data_df[st.session_state.input_column].values.shape[0])]
108
  if "selected_indices" in st.session_state:
109
- if len(st.session_state.selected_indices) >=4:
110
  l = st.session_state.selected_indices
111
  l.sort()
112
  indices = l
@@ -164,7 +164,7 @@ def main(myargs):
164
  plot = plotpx.scatter(
165
  df_embeddings, x='x', y='y',
166
  color='severity', labels={'color': 'severity'},
167
- hover_data=['text','all_predictions','data_index'],title = 'BERT Embeddings Visualization - Please select rows (at least 4) to display specific examples'
168
  )
169
 
170
  else:
@@ -172,7 +172,7 @@ def main(myargs):
172
  plot = plotpx.scatter_3d(
173
  df_embeddings, x='x', y='y', z='z',
174
  color='severity', labels={'color': 'severity'},
175
- hover_data=['text','all_predictions','data_index'],title = 'BERT Embeddings Visualization - Please select rows (at least 4) to display specific examples'
176
  )
177
 
178
  st.plotly_chart(plot,use_container_width=True,)
 
106
  if st.session_state['input_type'] == 'File' and "embeddings_all" in st.session_state and st.session_state.embeddings_plot in ["2D", "3D"]:
107
  indices = [x for x in range(st.session_state.data_df[st.session_state.input_column].values.shape[0])]
108
  if "selected_indices" in st.session_state:
109
+ if len(st.session_state.selected_indices) >4:
110
  l = st.session_state.selected_indices
111
  l.sort()
112
  indices = l
 
164
  plot = plotpx.scatter(
165
  df_embeddings, x='x', y='y',
166
  color='severity', labels={'color': 'severity'},
167
+ hover_data=['text','all_predictions','data_index'],title = 'BERT Embeddings Visualization - Please select rows (at least 5) to display specific examples'
168
  )
169
 
170
  else:
 
172
  plot = plotpx.scatter_3d(
173
  df_embeddings, x='x', y='y', z='z',
174
  color='severity', labels={'color': 'severity'},
175
+ hover_data=['text','all_predictions','data_index'],title = 'BERT Embeddings Visualization - Please select rows (at least 5) to display specific examples'
176
  )
177
 
178
  st.plotly_chart(plot,use_container_width=True,)