felipekitamura commited on
Commit
88cf807
·
verified ·
1 Parent(s): 37cb828

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,7 +22,7 @@ def plot_reduced_data(reduced_data, labels, title):
22
  plt.figure(figsize=(10, 8))
23
  plt.scatter(reduced_data[:, 0], reduced_data[:, 1], alpha=0.6)
24
  for i, label in enumerate(labels):
25
- plt.annotate(" " + label, (reduced_data[i, 0], reduced_data[i, 1]), fontsize=14)
26
  plt.title(title)
27
  # Data for the arrow 1
28
  start_point = (reduced_data[0, 0], reduced_data[0, 1]) # Starting point of the arrow
@@ -70,7 +70,7 @@ def inference(word1, word2, word3):
70
  word_list = [word1, word2, word3]
71
  word_list.extend([x for x,y in [item for item in output[:4]]])
72
  words = {key: model[key] for key in word_list}
73
- words["Equivalent"] = transform
74
  data = np.concatenate([x[np.newaxis, :] for x in words.values()], axis=0)
75
  print(data.shape)
76
  labels = words.keys()
 
22
  plt.figure(figsize=(10, 8))
23
  plt.scatter(reduced_data[:, 0], reduced_data[:, 1], alpha=0.6)
24
  for i, label in enumerate(labels):
25
+ plt.annotate(" " + label, (reduced_data[i, 0], reduced_data[i, 1]), fontsize=18)
26
  plt.title(title)
27
  # Data for the arrow 1
28
  start_point = (reduced_data[0, 0], reduced_data[0, 1]) # Starting point of the arrow
 
70
  word_list = [word1, word2, word3]
71
  word_list.extend([x for x,y in [item for item in output[:4]]])
72
  words = {key: model[key] for key in word_list}
73
+ words[word3 + " + (" + word2 + " - " + word1 + ")"] = transform
74
  data = np.concatenate([x[np.newaxis, :] for x in words.values()], axis=0)
75
  print(data.shape)
76
  labels = words.keys()