Omnibus commited on
Commit
1a8e0e1
·
1 Parent(s): b9c90b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -10,8 +10,9 @@ def scrape(instring):
10
  #r = requests.get(instring)
11
  chunk_size=2000
12
  url = f'{instring}'
13
- r = requests.get(url, stream=True)
14
-
 
15
  with open('/tmp/metadata.pdf', 'wb') as fd:
16
  for chunk in r.iter_content(chunk_size):
17
  fd.write(chunk)
@@ -25,7 +26,7 @@ def scrape(instring):
25
 
26
  #out = IFrame(src={instring}, width=700, height=600)
27
  #return gr.HTML.update(f'''<iframe src={out}, width=700, height=600></iframe>''')
28
- return gr.HTML.update(f'''{out}''')
29
 
30
  with gr.Blocks() as app:
31
  inp=gr.Textbox()
 
10
  #r = requests.get(instring)
11
  chunk_size=2000
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):
18
  fd.write(chunk)
 
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()