12 lines
242 B
Python
12 lines
242 B
Python
![]() |
import pandas as pd
|
||
|
|
||
|
def create_embeddings_file(data, path, func):
|
||
|
out = []
|
||
|
for line in data:
|
||
|
out.append(func(line))
|
||
|
df = pd.DataFrame(out)
|
||
|
df.to_csv(path)
|
||
|
|
||
|
def load_embeddings_file(path):
|
||
|
return pd.read_csv(path)
|