Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,8 +11,13 @@ 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 |
-
history
|
|
|
|
|
|
|
| 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']
|
| 18 |
return response
|
|
|
|
| 11 |
history = ""
|
| 12 |
|
| 13 |
def generate_text(input_text, history):
|
| 14 |
+
print("history ",history)
|
| 15 |
+
print("input ", input)
|
| 16 |
+
print("last history: ", history[-1])
|
| 17 |
full_conversation = f"{history} Q: {input_text} \n A:"
|
| 18 |
+
print("full convo", full_conversation)
|
| 19 |
+
temp_conversation = f"{history[-1]} Q: {input_text} \n A:"
|
| 20 |
+
print("temp convo", temp_conversation)
|
| 21 |
output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
| 22 |
response = output['choices'][0]['text']
|
| 23 |
return response
|