Update app.py
Browse files
app.py
CHANGED
|
@@ -16,10 +16,10 @@ pipe = pipeline(
|
|
| 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,
|
| 23 |
repetition_penalty=1.5,
|
| 24 |
return_full_text=False
|
| 25 |
)
|
|
@@ -39,7 +39,7 @@ Context:
|
|
| 39 |
{context}
|
| 40 |
|
| 41 |
Question:
|
| 42 |
-
|
| 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,
|
| 23 |
repetition_penalty=1.5,
|
| 24 |
return_full_text=False
|
| 25 |
)
|
|
|
|
| 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")
|