sritang commited on
Commit
e8f04ee
·
1 Parent(s): 0cf52e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
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
- plan[:20]
 
 
 
 
 
 
 
 
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]