Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from sklearn.decomposition import PCA
|
|
7 |
from sklearn.manifold import TSNE
|
8 |
model = gensim.downloader.load("word2vec-google-news-300") #glove-wiki-gigaword-50
|
9 |
|
10 |
-
cache = "/home/user/app/d.
|
11 |
|
12 |
# Function to reduce dimensions
|
13 |
def reduce_dimensions(data, method='PCA'):
|
@@ -29,7 +29,7 @@ def plot_reduced_data(reduced_data, labels, title):
|
|
29 |
plt.xlabel('Component 1')
|
30 |
plt.ylabel('Component 2')
|
31 |
plt.grid(True)
|
32 |
-
plt.savefig(cache
|
33 |
|
34 |
description = """
|
35 |
### Word Embedding Demo App
|
|
|
7 |
from sklearn.manifold import TSNE
|
8 |
model = gensim.downloader.load("word2vec-google-news-300") #glove-wiki-gigaword-50
|
9 |
|
10 |
+
cache = "/home/user/app/d.png"
|
11 |
|
12 |
# Function to reduce dimensions
|
13 |
def reduce_dimensions(data, method='PCA'):
|
|
|
29 |
plt.xlabel('Component 1')
|
30 |
plt.ylabel('Component 2')
|
31 |
plt.grid(True)
|
32 |
+
plt.savefig(cache) #, dpi=300)
|
33 |
|
34 |
description = """
|
35 |
### Word Embedding Demo App
|