Spaces:
Build error
Build error
Update initialize.py
Browse files1234567824 unmodified lines33343536373839from haystack import Document, Secretfrom haystack.document_stores.in_memory import InMemoryDocumentStorefrom haystack.components.retrievers.in_memory import InMemoryBM25Retrieverfrom haystack.components.builders import PromptBuilderfrom haystack.components.generators.hugging_face_local import HuggingFaceLocalGeneratorfrom haystack.pipeline import Pipelinedef init_doc_store(path, files):24 unmodified linesprompt_builder = PromptBuilder(template=template)generator = HuggingFaceTGIGenerator(model="mistralai/Mistral-7B-v0.1",token=Secret.from_token(api_key))generator.warm_up()12345678924 unmodified lines34353637383940from haystack import Documentfrom haystack.utils import Secretfrom haystack.document_stores.in_memory import InMemoryDocumentStorefrom haystack.components.retrievers.in_memory import InMemoryBM25Retrieverfrom haystack.components.builders import PromptBuilderfrom haystack.components.generators import HuggingFaceTGIGeneratorfrom haystack.pipeline import Pipelinedef init_doc_store(path, files):24 unmodified linesprompt_builder = PromptBuilder(template=template)generator = HuggingFaceTGIGenerator(model="mistralai/Mistral-7B-Instruct-v0.1",token=Secret.from_token(api_key))generator.warm_up()
initialize.py+4-3