felipekitamura commited on
Commit
cbb23b4
·
verified ·
1 Parent(s): 9d66951

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -87,12 +87,12 @@ def inference(word1, word2, word3):
87
  word_list.extend(output)
88
  words = {key: model[key] for key in word_list}
89
  words[word3 + " + (" + word2 + " - " + word1 + ")"] = transform
90
- #data = np.concatenate([x[np.newaxis, :] for x in words.values()], axis=0)
91
  #print(data.shape)
92
  labels = words.keys()
93
  #reduced_data_pca = reduce_dimensions(data, method='PCA')
94
  #print(reduced_data_pca.shape)
95
- plot_reduced_data(data, labels, 'PCA Results')
96
  return cache
97
 
98
  examples = [
 
87
  word_list.extend(output)
88
  words = {key: model[key] for key in word_list}
89
  words[word3 + " + (" + word2 + " - " + word1 + ")"] = transform
90
+ data2 = np.concatenate([x[np.newaxis, :] for x in words.values()], axis=0)
91
  #print(data.shape)
92
  labels = words.keys()
93
  #reduced_data_pca = reduce_dimensions(data, method='PCA')
94
  #print(reduced_data_pca.shape)
95
+ plot_reduced_data(data2, labels, 'PCA Results')
96
  return cache
97
 
98
  examples = [