Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ pipe = pipeline(
|
|
| 16 |
"text-generation",
|
| 17 |
model=model_name,
|
| 18 |
tokenizer=model_name,
|
| 19 |
-
|
| 20 |
temperature=0.0,
|
| 21 |
do_sample=False,
|
| 22 |
#num_beams=4,
|
|
@@ -39,7 +39,7 @@ Context:
|
|
| 39 |
{context}
|
| 40 |
|
| 41 |
Question:
|
| 42 |
-
{question}
|
| 43 |
"""
|
| 44 |
prompt = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
|
| 45 |
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/multi-qa-mpnet-base-dot-v1")
|
|
|
|
| 16 |
"text-generation",
|
| 17 |
model=model_name,
|
| 18 |
tokenizer=model_name,
|
| 19 |
+
max_new_tokens=250,
|
| 20 |
temperature=0.0,
|
| 21 |
do_sample=False,
|
| 22 |
#num_beams=4,
|
|
|
|
| 39 |
{context}
|
| 40 |
|
| 41 |
Question:
|
| 42 |
+
What could happen after: {question}
|
| 43 |
"""
|
| 44 |
prompt = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
|
| 45 |
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/multi-qa-mpnet-base-dot-v1")
|