Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,12 @@ import contextlib
|
|
| 7 |
_here = Path(__file__).parent
|
| 8 |
pdf_obj = _here / "H561907.pdf"
|
| 9 |
|
| 10 |
-
with open(pdf_obj) as f:
|
| 11 |
-
plan = f.read()
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
_here = Path(__file__).parent
|
| 8 |
pdf_obj = _here / "H561907.pdf"
|
| 9 |
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
import gradio as gr
|
| 12 |
+
import pdfminer
|
| 13 |
+
from pdfminer.high_level import extract_text
|
| 14 |
+
|
| 15 |
+
with open(pdf_obj,'rb') as f:
|
| 16 |
+
text = extract_text(f)
|
| 17 |
+
|
| 18 |
+
text[:20]
|