Created
October 4, 2022 14:08
-
-
Save kacperlukawski/7db2135b24ab8abebe06519b55e072d1 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
from sklearn.pipeline import make_pipeline | |
from embetter.grab import ColumnGrabber | |
from embetter.vision import ImageLoader, TimmEncoder | |
from embetter.text import SentenceEncoder | |
output_directory = Path("./images") | |
image_pipeline = make_pipeline( | |
ColumnGrabber("URL"), | |
DownloadFile(output_directory), | |
ImageLoader(), | |
TimmEncoder("vit_base_patch16_224"), | |
) | |
text_pipeline = make_pipeline( | |
ColumnGrabber("TEXT"), | |
SentenceEncoder("all-MiniLM-L6-v2"), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment