Spaces:
Build error
Build error
| import pickle | |
| import embedding | |
| from tqdm import tqdm | |
| class Neuron: | |
| def __init__(self, name, inp): | |
| self.name = name | |
| self.inp = embedding.getvec(inp) | |
| net = [] | |
| with open("dataset.txt", "r") as f: lines = f.readlines() | |
| for ind, i in tqdm(enumerate(lines[1:])): | |
| if not(i[:6] == "<null>" or lines[ind][:6] == "<null>"): net.append(Neuron(i, lines[ind])) | |
| with open("net.pckl", "wb") as f: pickle.dump(net, f) |