Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/airoboros-l2-13b-gpt4-
|
|
11 |
history = ""
|
12 |
|
13 |
def generate_text(input_text, history):
|
|
|
14 |
full_conversation = f"{history} Q: {input_text} \n A:"
|
15 |
output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
16 |
response = output['choices'][0]['text']
|
|
|
11 |
history = ""
|
12 |
|
13 |
def generate_text(input_text, history):
|
14 |
+
history = history[-1]
|
15 |
full_conversation = f"{history} Q: {input_text} \n A:"
|
16 |
output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
17 |
response = output['choices'][0]['text']
|