Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,9 +29,9 @@ def multimodal_rag(image, question):
|
|
29 |
context = query_engine.query(question)
|
30 |
|
31 |
# Step 2: Process with LLaVA
|
32 |
-
prompt = f"Context: {context}
|
33 |
|
34 |
-
Question: {question}"
|
35 |
inputs = processor(prompt, image, return_tensors="pt").to(model.device)
|
36 |
output = model.generate(**inputs, max_new_tokens=100)
|
37 |
answer = processor.decode(output[0], skip_special_tokens=True)
|
|
|
29 |
context = query_engine.query(question)
|
30 |
|
31 |
# Step 2: Process with LLaVA
|
32 |
+
prompt = f"""Context: {context}
|
33 |
|
34 |
+
Question: {question}"""
|
35 |
inputs = processor(prompt, image, return_tensors="pt").to(model.device)
|
36 |
output = model.generate(**inputs, max_new_tokens=100)
|
37 |
answer = processor.decode(output[0], skip_special_tokens=True)
|