EmanHassan26 commited on
Commit
66adaa4
·
verified ·
1 Parent(s): 9cf16c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, 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)
 
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)