JamalAG commited on
Commit
699d9af
·
1 Parent(s): 09fbb12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -9
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 = """Patient's Description: {patient_description}
14
-
15
- Doctor's Response: Thank you for sharing details about your headaches. Based on what you've described, it seems like you're managing your symptoms well by identifying triggers, taking naps, practicing yoga, and staying hydrated. It's important to continue these healthy habits.
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)