1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| from google.colab import files
uploaded = files.upload()
for fn in uploaded.keys(): print('Upload file "{name}" with length {length} bytes'.format(name=fn, length=len(uploaded[fn])))
im = imread("output.jpg")
embeddings_index = {}
from google.colab import drive import os drive.mount('/content/gdrive')
f = open(os.path.join('/content/gdrive/My Drive', 'glove.6B.100d.txt')) for line in f: values = line.split() word = values[0] coefs = np.asarray(values[1:], dtype='float32') embeddings_index[word] = coefs f.close() print('Found %s word vectors.' % len(embeddings_index))
from gensim.test.utils import datapath, get_tmpfile from google.colab import drive drive.mount('/content/gdrive')
glove_file = datapath('/content/gdrive/My Drive/glove.6B.100d.txt') xy = np.loadtxt( glove_file , delimiter=',', dtype=np.float32)
from gensim.test.utils import datapath, get_tmpfile feature_data = datapath('/content/gdrive/My Drive/AI/kaggle/' + '300features_40minwords_10text')
from google.colab import drive drive.mount('/content/gdrive') from matplotlib.pyplot import imread
im = imread("/content/gdrive/My Drive/NLP-Lab/output.jpg")
from google.colab import drive drive.mount('/content/gdrive')
xy = np.loadtxt('/content/gdrive/My Drive/data-01-test-score.csv', delimiter=',', dtype=np.float32)
x_data = xy[:, 0:-1] y_data = xy[:, [-1]]
|