Spaces:
Runtime error
Runtime error
gkrthk
commited on
Commit
•
f22b8d0
1
Parent(s):
d3deef7
fix
Browse files- confluence_qa.py +2 -2
confluence_qa.py
CHANGED
@@ -14,8 +14,8 @@ class ConfluenceQA:
|
|
14 |
def define_model(self) -> None:
|
15 |
tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-large")
|
16 |
model = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-large")
|
17 |
-
pipe = pipeline("text2text-generation", model=model, tokenizer=tokenizer, max_new_tokens=
|
18 |
-
self.llm = HuggingFacePipeline(pipeline = pipe,model_kwargs={"temperature": 0}
|
19 |
|
20 |
def store_in_vector_db(self) -> None:
|
21 |
persist_directory = self.config.get("persist_directory",None)
|
|
|
14 |
def define_model(self) -> None:
|
15 |
tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-large")
|
16 |
model = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-large")
|
17 |
+
pipe = pipeline("text2text-generation", model=model, tokenizer=tokenizer, max_new_tokens=1024, truncation=True)
|
18 |
+
self.llm = HuggingFacePipeline(pipeline = pipe,model_kwargs={"temperature": 0, "max_length": 1024})
|
19 |
|
20 |
def store_in_vector_db(self) -> None:
|
21 |
persist_directory = self.config.get("persist_directory",None)
|