Spaces:
Runtime error
Runtime error
Update rag.py
Browse files
rag.py
CHANGED
|
@@ -50,10 +50,11 @@ class RAG:
|
|
| 50 |
}
|
| 51 |
|
| 52 |
query = f"### Instruction\n{instruction}\n\n### Context\n{context}\n\n### Answer\n "
|
|
|
|
| 53 |
|
| 54 |
|
| 55 |
payload = {
|
| 56 |
-
"inputs": query,
|
| 57 |
"parameters": {"MAX_NEW_TOKENS": 750, "TEMPERATURE": 0.35}
|
| 58 |
}
|
| 59 |
|
|
|
|
| 50 |
}
|
| 51 |
|
| 52 |
query = f"### Instruction\n{instruction}\n\n### Context\n{context}\n\n### Answer\n "
|
| 53 |
+
prompt = "You are a helpful assistant. Answer the question using only the context you are provided with. If it is not possible to do it with the context, just say 'I can't answer'. "
|
| 54 |
|
| 55 |
|
| 56 |
payload = {
|
| 57 |
+
"inputs": prompt + query,
|
| 58 |
"parameters": {"MAX_NEW_TOKENS": 750, "TEMPERATURE": 0.35}
|
| 59 |
}
|
| 60 |
|