From a80e1e90561d674aac9751086f527a8f7c910ed1 Mon Sep 17 00:00:00 2001 From: Lars Kaesberg <33939116+lkaesberg@users.noreply.github.com> Date: Fri, 6 Sep 2024 00:05:14 +0200 Subject: [PATCH] Update model.py --- contextplus/model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contextplus/model.py b/contextplus/model.py index 273c894..ada5c88 100644 --- a/contextplus/model.py +++ b/contextplus/model.py @@ -3,10 +3,10 @@ from transformers import pipeline # Loading models -device = "cpu" # todo only for cpu testing, can be removed to automatically choose the device -gist_embedding = SentenceTransformer("avsolatorio/GIST-small-Embedding-v0", device=device) -bart_summarizer = pipeline("summarization", model="facebook/bart-large-cnn", device=device) -flan_t5 = pipeline("text2text-generation", model="google/flan-t5-base", device=device) +#device = "cpu" # todo only for cpu testing, can be removed to automatically choose the device +gist_embedding = SentenceTransformer("avsolatorio/GIST-small-Embedding-v0") +bart_summarizer = pipeline("summarization", model="facebook/bart-large-cnn") +flan_t5 = pipeline("text2text-generation", model="google/flan-t5-base") # ------------------------------------------------ Embedding Model ----------------------------------------------------