Created
June 11, 2024 17:22
-
-
Save elijahbenizzy/3e9c249ec31bf582ecac140e4dce8ed8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def embeddings_df(urls: pd.DataFrame, embedder: URLEmbedder) -> pd.DataFrame: | |
"""Adds embeddings to the given URL DataFrame.""" | |
urls["embeddings"] = [embedder.embed(url, normalize_embeddings=True) for url in urls["url"]] | |
return urls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment