Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,15 +10,10 @@ def generate_answer(query):
|
|
10 |
model_kwargs={"temperature": 0.7, "max_length": 64, "max_new_tokens": 512}
|
11 |
)
|
12 |
|
13 |
-
template = """
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
To further assist you, could you provide more insight into any specific patterns you've noticed with your headaches? For example, do they follow a particular schedule or worsen during certain times of the day? Additionally, have you experienced any other associated symptoms that might be relevant?
|
18 |
-
|
19 |
-
Your proactive approach to managing stress and avoiding triggers is commendable. Let's work together to explore additional strategies that may enhance your overall well-being.
|
20 |
-
"""
|
21 |
-
|
22 |
prompt = PromptTemplate(template=template, input_variables=["query"])
|
23 |
llm_chain = LLMChain(prompt=prompt, llm=llm)
|
24 |
result = llm_chain.run(query)
|
|
|
10 |
model_kwargs={"temperature": 0.7, "max_length": 64, "max_new_tokens": 512}
|
11 |
)
|
12 |
|
13 |
+
template = """Question: {question}
|
14 |
+
|
15 |
+
Answer: Let's think step by step."""
|
16 |
+
|
|
|
|
|
|
|
|
|
|
|
17 |
prompt = PromptTemplate(template=template, input_variables=["query"])
|
18 |
llm_chain = LLMChain(prompt=prompt, llm=llm)
|
19 |
result = llm_chain.run(query)
|