Cheselle commited on
Commit
c552fa2
·
1 Parent(s): 82d38eb

The RAG is a rag

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -101,16 +101,12 @@ def process_pdf_file(file: AskFileResponse):
101
  f.write(file.content)
102
 
103
  doc = pymupdf.open(temp_file_path)
104
- documents = doc.load_documents()
105
- texts = text_splitter.split_texts(documents)
106
- return texts
107
- """
108
  texts = []
109
  for page in doc:
110
  texts.append(page.get_text())
111
- """
112
  # os.remove(temp_file_path) checking whether this is better
113
- #return texts
114
 
115
  @cl.on_chat_start
116
  async def on_chat_start():
 
101
  f.write(file.content)
102
 
103
  doc = pymupdf.open(temp_file_path)
 
 
 
 
104
  texts = []
105
  for page in doc:
106
  texts.append(page.get_text())
107
+
108
  # os.remove(temp_file_path) checking whether this is better
109
+ return texts
110
 
111
  @cl.on_chat_start
112
  async def on_chat_start():