ankitkushwaha90 commited on
Commit
5f75e42
·
verified ·
1 Parent(s): 9e7ab16

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - common-pile/caselaw_access_project
5
+ language:
6
+ - en
7
+ base_model:
8
+ - openai/gpt-oss-120b
9
+ new_version: openai/gpt-oss-20b
10
+ pipeline_tag: fill-mask
11
+ library_name: adapter-transformers
12
+ tags:
13
+ - content
14
+ ---
15
+ That error is happening because your script is trying to save the FAISS index into a folder called rag_index/, but that folder doesn’t exist yet.
16
+
17
+ FAISS doesn’t auto-create directories, so you have to make sure the folder exists before writing.
18
+
19
+ ### Quick fix
20
+ In your project folder (RAG_practicle), run:
21
+
22
+ ```bash
23
+ mkdir rag_index
24
+ ```
25
+ Then rerun:
26
+
27
+ ```bash
28
+ python rag.py --build-corpus sample_docs
29
+ ```
30
+ ### Permanent fix in code
31
+ Inside rag.py, right before saving the index in self.index.fit(...) or before faiss.write_index(...), add:
32
+
33
+ ```python
34
+ import os
35
+ os.makedirs("rag_index", exist_ok=True)
36
+ ```
37
+ That way the script will automatically create the folder if it doesn’t exist.
38
+
39
+ Do you want me to update your rag.py so it auto-creates rag_index/ and avoids this crash forever? That would make it more robust.