Omnibus commited on
Commit
f309ab6
·
1 Parent(s): 7af1428

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -8,8 +8,11 @@ import requests
8
  #from IPython.display import IFrame
9
 
10
  def scrape(instring):
11
-
12
- return gr.HTML.update(f'''<object data="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" width="100%" height="500px"></object>''')
 
 
 
13
 
14
  def scrape1(instring):
15
  # set the url to perform the get request
 
8
  #from IPython.display import IFrame
9
 
10
  def scrape(instring):
11
+ reader = PdfReader(f"instring")
12
+ number_of_pages = len(reader.pages)
13
+ page = reader.pages[0]
14
+ text = page.extract_text()
15
+ return gr.HTML.update(f'''{text}''')
16
 
17
  def scrape1(instring):
18
  # set the url to perform the get request