Skip to content

Commit

Permalink
removed requirement for nonlocal installs
Browse files Browse the repository at this point in the history
  • Loading branch information
emcf committed Apr 16, 2024
1 parent 37251dc commit a4ec6c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ requests
pillow
cssutils
beautifulsoup4
PyMuPDF
magika
2 changes: 1 addition & 1 deletion thepipe_api/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from PIL import Image
import requests
import json
import fitz
from .core import Chunk, print_status, SourceTypes, create_chunks_from_messages, API_URL
import tempfile
import mimetypes
Expand Down Expand Up @@ -183,6 +182,7 @@ def extract_pdf(file_path: str, ai_extraction: bool = False, text_only: bool = F
messages = response_json['messages']
chunks = create_chunks_from_messages(messages)
else:
import fitz
# extract text and images of each page from the PDF
with open(file_path, 'rb') as file:
doc = fitz.open(file_path)
Expand Down

0 comments on commit a4ec6c6

Please sign in to comment.