Download src/retrieval/test.py from Ilaa-1505/Explainable-RAG-System: direct link, hf CLI and curl.
- Browser
- Download file 329 Bytes
-
https://huggingface.co/spaces/Ilaa-1505/Explainable-RAG-System/resolve/main/src/retrieval/test.py
- Command line
-
hf download hf://spaces/Ilaa-1505/Explainable-RAG-System/src/retrieval/test.py
-
curl -L -o test.py https://huggingface.co/spaces/Ilaa-1505/Explainable-RAG-System/resolve/main/src/retrieval/test.py
329 Bytes
| from query import retrieve | |
| if __name__ == "__main__": | |
| q = "how to install transformers" | |
| results, debug = retrieve(q) | |
| for i, r in enumerate(results): | |
| print(f"\n--- Result {i+1} ---") | |
| print("Score:", r["rerank_score"]) | |
| print(r["text"][:300]) | |
| print("\n--- DEBUG INFO ---") | |
| print(debug) |