Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -64,8 +64,8 @@ def stream_chat(message, history: list, temperature: float, max_new_tokens: int)
|
|
64 |
for prompt, answer in history:
|
65 |
if answer is None:
|
66 |
conversation.extend([{"role": "user", "content":""}])
|
67 |
-
|
68 |
-
conversation.extend([{"role": "assistant", "content": answer}])
|
69 |
conversation.append({"role": "user", "content": message['text']})
|
70 |
|
71 |
print(f"Conversation is -\n{conversation}")
|
|
|
64 |
for prompt, answer in history:
|
65 |
if answer is None:
|
66 |
conversation.extend([{"role": "user", "content":""}])
|
67 |
+
conversation[0]['content'] = f"<|image_1|>\n{prompt}"
|
68 |
+
conversation.extend([{"role": "user", "content": prompt}, {"role": "assistant", "content": answer}])
|
69 |
conversation.append({"role": "user", "content": message['text']})
|
70 |
|
71 |
print(f"Conversation is -\n{conversation}")
|