Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,9 @@ def download_model():
|
|
29 |
|
30 |
def question_answer(context, question):
|
31 |
mfile=download_model()
|
32 |
-
|
|
|
|
|
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)
|