Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -183,7 +183,7 @@ def multimodal_rag_query(user_query, num_images_to_retrieve):
|
|
| 183 |
|
| 184 |
# 4. Pass directly to the processor without using apply_chat_template
|
| 185 |
inputs = processor(images=[retrieved_images_raw] if len(retrieved_images_raw) > 0 else None,
|
| 186 |
-
text=prompt_text,
|
| 187 |
|
| 188 |
#prompt_text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 189 |
#inputs = processor(images=retrieved_images_raw, texts=[prompt_text], padding=True, return_tensors="pt").to(device)
|
|
|
|
| 183 |
|
| 184 |
# 4. Pass directly to the processor without using apply_chat_template
|
| 185 |
inputs = processor(images=[retrieved_images_raw] if len(retrieved_images_raw) > 0 else None,
|
| 186 |
+
text=prompt_text, return_tensors="pt").to(device)
|
| 187 |
|
| 188 |
#prompt_text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 189 |
#inputs = processor(images=retrieved_images_raw, texts=[prompt_text], padding=True, return_tensors="pt").to(device)
|