Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -452,10 +452,12 @@ def bot(history, temperature, top_p, max_output_tokens):
|
|
452 |
print(input_ids.device)
|
453 |
print(image_tensor.device)
|
454 |
|
|
|
|
|
455 |
generate_kwargs = dict(
|
456 |
inputs=input_ids,
|
457 |
streamer=streamer,
|
458 |
-
images=image_tensor,
|
459 |
do_sample=True,
|
460 |
temperature=temperature,
|
461 |
top_p=top_p,
|
|
|
452 |
print(input_ids.device)
|
453 |
print(image_tensor.device)
|
454 |
|
455 |
+
|
456 |
+
|
457 |
generate_kwargs = dict(
|
458 |
inputs=input_ids,
|
459 |
streamer=streamer,
|
460 |
+
images=[image_tensor] if is_video else image_tensor,
|
461 |
do_sample=True,
|
462 |
temperature=temperature,
|
463 |
top_p=top_p,
|