Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -69,13 +69,14 @@ def bot_streaming(message, history):
|
|
69 |
gr.Error("You need to upload an image for LLaVA to work.")
|
70 |
|
71 |
print('process end')
|
|
|
72 |
|
73 |
|
74 |
conv = conv_templates['llama_3'].copy()
|
75 |
if len(history) == 0:
|
76 |
user = DEFAULT_IMAGE_TOKEN + '\n' + message['text']
|
77 |
else:
|
78 |
-
for idx,
|
79 |
# conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|
80 |
if idx == 0:
|
81 |
user = DEFAULT_IMAGE_TOKEN + '\n' + user
|
|
|
69 |
gr.Error("You need to upload an image for LLaVA to work.")
|
70 |
|
71 |
print('process end')
|
72 |
+
print('history', history)
|
73 |
|
74 |
|
75 |
conv = conv_templates['llama_3'].copy()
|
76 |
if len(history) == 0:
|
77 |
user = DEFAULT_IMAGE_TOKEN + '\n' + message['text']
|
78 |
else:
|
79 |
+
for idx, user, assistant in enumerate(history):
|
80 |
# conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|
81 |
if idx == 0:
|
82 |
user = DEFAULT_IMAGE_TOKEN + '\n' + user
|