mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
Merge pull request #111 from murtazahr/main
Add support for jupyter notebooks.
This commit is contained in:
commit
e35f6063d7
@ -19,6 +19,7 @@ from parsers.txt import process_txt
|
||||
from parsers.csv import process_csv
|
||||
from parsers.docx import process_docx
|
||||
from parsers.pdf import process_pdf
|
||||
from parsers.notebook import process_ipnyb
|
||||
from parsers.markdown import process_markdown
|
||||
from parsers.powerpoint import process_powerpoint
|
||||
from parsers.html import process_html
|
||||
@ -91,6 +92,7 @@ file_processors = {
|
||||
".pptx": process_powerpoint,
|
||||
".docx": process_docx,
|
||||
".epub": process_epub,
|
||||
".ipynb": process_ipnyb,
|
||||
}
|
||||
|
||||
async def filter_file(file: UploadFile, supabase, vector_store, stats_db):
|
||||
|
7
backend/parsers/notebook.py
Normal file
7
backend/parsers/notebook.py
Normal file
@ -0,0 +1,7 @@
|
||||
from .common import process_file
|
||||
from langchain.document_loaders import NotebookLoader
|
||||
from fastapi import UploadFile
|
||||
|
||||
|
||||
def process_ipnyb(vector_store, file: UploadFile, stats_db):
|
||||
return process_file(vector_store, file, NotebookLoader, "ipynb", stats_db=stats_db)
|
Loading…
Reference in New Issue
Block a user