Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,11 @@ def inference(word1, word2, word3):
|
|
38 |
word_list = [word1, word2, word3]
|
39 |
word_list.extend([x for x,y in output[:4]])
|
40 |
words = {key: model[key] for key in word_list}
|
41 |
-
data = np.concatenate([x[np.newaxis, :] for x in words.values()], axis=0
|
|
|
42 |
labels = words.keys()
|
43 |
reduced_data_pca = reduce_dimensions(data, method='PCA')
|
|
|
44 |
df = pd.DataFrame({
|
45 |
"x": reduced_data_pca[:, 0],
|
46 |
"y": reduced_data_pca[:, 1],
|
|
|
38 |
word_list = [word1, word2, word3]
|
39 |
word_list.extend([x for x,y in output[:4]])
|
40 |
words = {key: model[key] for key in word_list}
|
41 |
+
data = np.concatenate([x[np.newaxis, :] for x in words.values()], axis=0
|
42 |
+
print(data.shape)
|
43 |
labels = words.keys()
|
44 |
reduced_data_pca = reduce_dimensions(data, method='PCA')
|
45 |
+
print(reduced_data_pca.shape)
|
46 |
df = pd.DataFrame({
|
47 |
"x": reduced_data_pca[:, 0],
|
48 |
"y": reduced_data_pca[:, 1],
|