Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -210,9 +210,9 @@ def generate_answer_with_groq(client, query: str, relevant_chunks: List[Dict]) -
|
|
| 210 |
try:
|
| 211 |
# Build strict context with page citations
|
| 212 |
context_parts = [f"[Page {c['page_number']}]: {c['text']}" for c in relevant_chunks]
|
| 213 |
-
context = "
|
| 214 |
|
| 215 |
-
|
| 216 |
|
| 217 |
prompt = f"""Based ONLY on the following context from a PDF document, answer the user's question.
|
| 218 |
|
|
|
|
| 210 |
try:
|
| 211 |
# Build strict context with page citations
|
| 212 |
context_parts = [f"[Page {c['page_number']}]: {c['text']}" for c in relevant_chunks]
|
| 213 |
+
context = ""
|
| 214 |
|
| 215 |
+
.join(context_parts)
|
| 216 |
|
| 217 |
prompt = f"""Based ONLY on the following context from a PDF document, answer the user's question.
|
| 218 |
|