Spaces:
Runtime error
Runtime error
bug fix
Browse files
backend/disentangle_concepts.py
CHANGED
@@ -43,6 +43,7 @@ def get_separation_space(type_bin, annotations, df, samples=200, method='LR', C=
|
|
43 |
else:
|
44 |
print('Error: type_bin must be either a string or a list of strings of len 2')
|
45 |
return
|
|
|
46 |
X = X.reshape((2*samples, 512))
|
47 |
y = np.array([1]*samples + [0]*samples)
|
48 |
x_train, x_val, y_train, y_val = train_test_split(X, y, test_size=0.2)
|
|
|
43 |
else:
|
44 |
print('Error: type_bin must be either a string or a list of strings of len 2')
|
45 |
return
|
46 |
+
|
47 |
X = X.reshape((2*samples, 512))
|
48 |
y = np.array([1]*samples + [0]*samples)
|
49 |
x_train, x_val, y_train, y_val = train_test_split(X, y, test_size=0.2)
|
pages/3_Oxford_Vases_Disentanglement.py
CHANGED
@@ -56,7 +56,7 @@ with input_col_1:
|
|
56 |
concept_ids = st.multiselect('Concepts:', tuple(labels), max_selections=2, default=['AMPHORA', 'CHALICE'])
|
57 |
|
58 |
st.write('**Choose a latent space to disentangle**')
|
59 |
-
space_id = st.selectbox('Space:', tuple(['
|
60 |
|
61 |
choose_text_button = st.form_submit_button('Choose the defined concept and space to disentangle')
|
62 |
|
|
|
56 |
concept_ids = st.multiselect('Concepts:', tuple(labels), max_selections=2, default=['AMPHORA', 'CHALICE'])
|
57 |
|
58 |
st.write('**Choose a latent space to disentangle**')
|
59 |
+
space_id = st.selectbox('Space:', tuple(['W', 'Z']))
|
60 |
|
61 |
choose_text_button = st.form_submit_button('Choose the defined concept and space to disentangle')
|
62 |
|