Update app.py
Browse files
app.py
CHANGED
@@ -38,10 +38,10 @@ if st.button('Compute similarity'):
|
|
38 |
print('Generating visualization...')
|
39 |
sentembs, data = load_plot_data()
|
40 |
X_embedded = TSNE(n_components=2, learning_rate='auto',
|
41 |
-
init='random').fit_transform(np.concatenate([sentembs, encodings], axis=
|
42 |
|
43 |
-
data.append({'sent': sent1, 'color': '#F0E442'}) # sentence 1
|
44 |
-
data.append({'sent': sent2, 'color': '#D55E00'}) # sentence 2
|
45 |
data['x'] = X_embedded[:,0]
|
46 |
data['y'] = X_embedded[:,1]
|
47 |
|
|
|
38 |
print('Generating visualization...')
|
39 |
sentembs, data = load_plot_data()
|
40 |
X_embedded = TSNE(n_components=2, learning_rate='auto',
|
41 |
+
init='random').fit_transform(np.concatenate([sentembs, encodings], axis=0))
|
42 |
|
43 |
+
data = data.append({'sent': sent1, 'color': '#F0E442'}) # sentence 1
|
44 |
+
data = data.append({'sent': sent2, 'color': '#D55E00'}) # sentence 2
|
45 |
data['x'] = X_embedded[:,0]
|
46 |
data['y'] = X_embedded[:,1]
|
47 |
|