Spaces:
Runtime error
Runtime error
Update requirements.txt
Browse files- requirements.txt +13 -36
requirements.txt
CHANGED
@@ -1,36 +1,13 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|