kat33 commited on
Commit
9fe5d5a
1 Parent(s): 36d9e29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -29,7 +29,9 @@ def download_model():
29
 
30
  def question_answer(context, question):
31
  mfile=download_model()
32
- text=context + "\n\nQuestion: \"\"\"\n" + question + "\nPlease use markdown formatting for answer. \nAnswer:\n"
 
 
33
  llm = Llama(model_path=mfile)
34
  output = llm(text, max_tokens=33, stop=["### Response"], echo=True)
35
  print(output)
 
29
 
30
  def question_answer(context, question):
31
  mfile=download_model()
32
+ # structure the prompt to make it easier for the ai
33
+ question="\"\"\"\n" + question + "\"\"\"\n"
34
+ text=context + "\n\nQuestion: " + question + "\nPlease use markdown formatting for answer. \nAnswer:\n"
35
  llm = Llama(model_path=mfile)
36
  output = llm(text, max_tokens=33, stop=["### Response"], echo=True)
37
  print(output)