Omnibus commited on
Commit
3f50fbe
·
1 Parent(s): 7c1d83e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,6 +12,7 @@ def scrape(instring):
12
  url = f'{instring}'
13
  r = requests.get(url, stream=True)
14
  html_content = requests.get(url).text
 
15
 
16
  with open('/tmp/metadata.pdf', 'wb') as fd:
17
  for chunk in r.iter_content(chunk_size):
@@ -26,7 +27,7 @@ def scrape(instring):
26
 
27
  #out = IFrame(src={instring}, width=700, height=600)
28
  #return gr.HTML.update(f'''<iframe src={out}, width=700, height=600></iframe>''')
29
- return gr.HTML.update(f'''{html_content}''')
30
 
31
  with gr.Blocks() as app:
32
  inp=gr.Textbox()
 
12
  url = f'{instring}'
13
  r = requests.get(url, stream=True)
14
  html_content = requests.get(url).text
15
+ soup = BeautifulSoup(html_content,"html.parser")
16
 
17
  with open('/tmp/metadata.pdf', 'wb') as fd:
18
  for chunk in r.iter_content(chunk_size):
 
27
 
28
  #out = IFrame(src={instring}, width=700, height=600)
29
  #return gr.HTML.update(f'''<iframe src={out}, width=700, height=600></iframe>''')
30
+ return gr.HTML.update(f'''{soup}''')
31
 
32
  with gr.Blocks() as app:
33
  inp=gr.Textbox()