wfranco commited on
Commit
7401e47
1 Parent(s): bc49441

Update requirements.txt

Browse files
Files changed (1) hide show
  1. requirements.txt +13 -36
requirements.txt CHANGED
@@ -1,36 +1,13 @@
1
- !pip install PyPDF2
2
-
3
- #PyPDF2: To read the PDF file from the repository path.
4
- !pip install pdfminer.six
5
- !pip install pdfplumber
6
- !pip install pdf2image
7
- !pip install Pillow
8
- !pip install pytesseract
9
-
10
- #Other libraries
11
- !apt-get install poppler-utils
12
- !apt install tesseract-ocr
13
- !apt install libtesseract-dev
14
-
15
- # To read the PDF
16
- import PyPDF2
17
- from pdfminer.high_level import extract_pages, extract_text
18
- from pdfminer.layout import LTTextContainer, LTChar, LTRect, LTFigure
19
- import pdfplumber
20
- from PIL import Image
21
- from pdf2image import convert_from_path
22
- import pytesseract
23
- import os
24
-
25
- ! pip install transformers
26
- from transformers import pipeline
27
- import torch
28
- from transformers import pipeline
29
-
30
- hf_name = 'pszemraj/led-large-book-summary'
31
-
32
- summarizer = pipeline(
33
- "summarization",
34
- hf_name,
35
- device=0 if torch.cuda.is_available() else -1,
36
- )
 
1
+ PyPDF2
2
+ pdfminer.six
3
+ pdfplumber
4
+ pdf2image
5
+ Pillow
6
+ pytesseract
7
+
8
+ poppler-utils
9
+ tesseract-ocr
10
+ libtesseract-dev
11
+
12
+ transformers
13
+ torch